You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
24 lines
706 B
TypeScript
24 lines
706 B
TypeScript
import { RedisArgument, TuplesToMapReply, BlobStringReply, NumberReply, UnwrapReply, Resp2Reply, Command } from '@redis/client/dist/lib/RESP/types';
|
|
|
|
export type BfInfoReply = TuplesToMapReply<[
|
|
[BlobStringReply<'width'>, NumberReply],
|
|
[BlobStringReply<'depth'>, NumberReply],
|
|
[BlobStringReply<'count'>, NumberReply]
|
|
]>;
|
|
|
|
export default {
|
|
FIRST_KEY_INDEX: 1,
|
|
IS_READ_ONLY: true,
|
|
transformArguments(key: RedisArgument) {
|
|
return ['CMS.INFO', key];
|
|
},
|
|
transformReply: {
|
|
2: (reply: UnwrapReply<Resp2Reply<BfInfoReply>>) => ({
|
|
width: reply[1],
|
|
depth: reply[3],
|
|
count: reply[5]
|
|
}),
|
|
3: undefined as unknown as () => BfInfoReply
|
|
}
|
|
} as const satisfies Command;
|