You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
use dockers for tests, use npm workspaces, add rejson & redisearch modules, fix some bugs
This commit is contained in:
14
packages/client/lib/command-options.ts
Normal file
14
packages/client/lib/command-options.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
const symbol = Symbol('Command Options');
|
||||
|
||||
export type CommandOptions<T> = T & {
|
||||
readonly [symbol]: true;
|
||||
};
|
||||
|
||||
export function commandOptions<T>(options: T): CommandOptions<T> {
|
||||
(options as any)[symbol] = true;
|
||||
return options as CommandOptions<T>;
|
||||
}
|
||||
|
||||
export function isCommandOptions<T>(options: any): options is CommandOptions<T> {
|
||||
return options && options[symbol] === true;
|
||||
}
|
Reference in New Issue
Block a user