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:
@@ -361,53 +361,3 @@ type ReplyWithPolicy<
|
||||
// otherwise, return array of replies
|
||||
Array<REPLY>
|
||||
);
|
||||
|
||||
const SAME = {
|
||||
transformArguments(key: string): Array<string> {
|
||||
return ['GET', key];
|
||||
},
|
||||
transformReply: () => 'default' as const
|
||||
} satisfies Command;
|
||||
|
||||
type SAME_DEFAULT = CommandWithPoliciesSignature<
|
||||
typeof SAME,
|
||||
2,
|
||||
{},
|
||||
{
|
||||
request: REQUEST_POLICIES['ALL_NODES'];
|
||||
response: RESPONSE_POLICIES['SPECIAL'];
|
||||
}
|
||||
>;
|
||||
|
||||
// type SAME_RESP2 = CommandReply<typeof SAME, 2>;
|
||||
// type SAME_COMMAND_RESP2 = CommandSignuture<typeof SAME, 2>;
|
||||
// type SAME_RESP3 = CommandReply<typeof SAME, 3>;
|
||||
// type SAME_COMMAND_RESP3 = CommandSignuture<typeof SAME, 3>;
|
||||
|
||||
// interface Test {
|
||||
// /**
|
||||
// * This is a test
|
||||
// */
|
||||
// a: 'a';
|
||||
// }
|
||||
|
||||
// const DIFFERENT = {
|
||||
// transformArguments(key: string): Array<string> {
|
||||
// return ['GET', key];
|
||||
// },
|
||||
// transformReply: {
|
||||
// 2: () => null as any as Test,
|
||||
// 3: () => '3' as const
|
||||
// }
|
||||
// } satisfies Command;
|
||||
|
||||
// type DIFFERENT_RESP2 = CommandReply<typeof DIFFERENT, 2>;
|
||||
// type DIFFERENT_COMMAND_RESP2 = CommandSignuture<typeof DIFFERENT, 2>;
|
||||
// type DIFFERENT_RESP3 = CommandReply<typeof DIFFERENT, 3>;
|
||||
// type DIFFERENT_COMMAND_RESP3 = CommandSignuture<typeof DIFFERENT, 3>;
|
||||
|
||||
// const a = null as any as DIFFERENT_COMMAND_RESP2;
|
||||
|
||||
// const b = await a('a');
|
||||
|
||||
// b.a
|
Reference in New Issue
Block a user