You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
WIP
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
export function transformArguments(): Array<string> {
|
||||
return ['MODULE', 'LIST'];
|
||||
}
|
||||
import { ArrayReply, BlobStringReply, NumberReply, Command, Resp2Reply, TuplesToMapReply } from '../RESP/types';
|
||||
|
||||
export declare function transformReply(): string;
|
||||
export type ModuleListReply = ArrayReply<TuplesToMapReply<[
|
||||
[BlobStringReply<'name'>, BlobStringReply],
|
||||
[BlobStringReply<'version'>, NumberReply],
|
||||
]>>;
|
||||
|
||||
export default {
|
||||
IS_READ_ONLY: true,
|
||||
FIRST_KEY_INDEX: undefined,
|
||||
transformArguments() {
|
||||
return ['MODULE', 'LIST'];
|
||||
},
|
||||
transformReply: {
|
||||
2: (reply: Resp2Reply<ModuleListReply>) => {
|
||||
return reply.map(module => ({
|
||||
name: module[1],
|
||||
version: module[3]
|
||||
}));
|
||||
},
|
||||
3: undefined as unknown as () => ModuleListReply
|
||||
}
|
||||
} as const satisfies Command;
|
||||
|
Reference in New Issue
Block a user