= {
[P in keyof M as ExcludeMappedString]: {
[C in keyof M[P] as ExcludeMappedString]: RedisClientCommandSignature;
};
};
export declare type WithScripts = {
[P in keyof S as ExcludeMappedString]: RedisClientCommandSignature;
};
export declare type RedisClientType, S extends RedisScripts = Record> = RedisClient & WithCommands & WithModules & WithScripts;
export declare type InstantiableRedisClient = new (options?: RedisClientOptions) => RedisClientType;
export interface ClientCommandOptions extends QueueCommandOptions {
isolated?: boolean;
}
export default class RedisClient extends EventEmitter {
#private;
static commandOptions(options: T): CommandOptions;
commandOptions: typeof RedisClient.commandOptions;
static extend(plugins?: RedisPlugins): InstantiableRedisClient;
static create(options?: RedisClientOptions): RedisClientType;
static parseURL(url: string): RedisClientOptions;
get options(): RedisClientOptions | undefined;
get isOpen(): boolean;
get v4(): Record;
constructor(options?: RedisClientOptions);
duplicate(overrides?: Partial>): RedisClientType;
connect(): Promise;
commandsExecutor(command: RedisCommand, args: Array): Promise>;
sendCommand(args: RedisCommandArguments, options?: ClientCommandOptions): Promise;
scriptsExecutor(script: RedisScript, args: Array): Promise>;
executeScript(script: RedisScript, args: RedisCommandArguments, options?: ClientCommandOptions): Promise>;
SELECT(db: number): Promise;
SELECT(options: CommandOptions, db: number): Promise;
select: {
(db: number): Promise;
(options: CommandOptions, db: number): Promise;
};
SUBSCRIBE(channels: string | Array, listener: PubSubListener, bufferMode?: T): Promise;
subscribe: (channels: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise;
PSUBSCRIBE(patterns: string | Array, listener: PubSubListener, bufferMode?: T): Promise;
pSubscribe: (patterns: string | Array, listener: PubSubListener, bufferMode?: T | undefined) => Promise;
UNSUBSCRIBE(channels?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise;
unsubscribe: (channels?: string | string[] | undefined, listener?: PubSubListener | undefined, bufferMode?: T | undefined) => Promise;
PUNSUBSCRIBE(patterns?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise;
pUnsubscribe: (patterns?: string | string[] | undefined, listener?: PubSubListener | undefined, bufferMode?: T | undefined) => Promise;
QUIT(): Promise;
quit: () => Promise;
executeIsolated(fn: (client: RedisClientType) => T | Promise): Promise;
multi(): RedisClientMultiCommandType;
multiExecutor(commands: Array, chainId?: symbol): Promise>;
scanIterator(options?: ScanCommandOptions): AsyncIterable;
hScanIterator(key: string, options?: ScanOptions): AsyncIterable>;
sScanIterator(key: string, options?: ScanOptions): AsyncIterable;
zScanIterator(key: string, options?: ScanOptions): AsyncIterable>;
disconnect(): Promise;
}
export {};