= {
[P in keyof M as ExcludeMappedString]: {
[C in keyof M[P] as ExcludeMappedString]: ValkeyCommandSignature;
};
};
export type WithFunctions = {
[P in keyof F as ExcludeMappedString]: {
[FF in keyof F[P] as ExcludeMappedString]: ValkeyCommandSignature;
};
};
export type WithScripts = {
[P in keyof S as ExcludeMappedString]: ValkeyCommandSignature;
};
export type ValkeyClientType, F extends ValkeyFunctions = Record, S extends ValkeyScripts = Record> = ValkeyClient & WithCommands & WithModules & WithFunctions & WithScripts;
export type InstantiableValkeyClient = new (options?: ValkeyClientOptions) => ValkeyClientType;
export interface ClientCommandOptions extends QueueCommandOptions {
isolated?: boolean;
}
export default class ValkeyClient extends EventEmitter {
#private;
static commandOptions(options: T): CommandOptions;
commandOptions: typeof ValkeyClient.commandOptions;
static extend(extensions?: ValkeyExtensions): InstantiableValkeyClient;
static create(options?: ValkeyClientOptions): ValkeyClientType;
static parseURL(url: string): ValkeyClientOptions;
get options(): ValkeyClientOptions | undefined;
get isOpen(): boolean;
get isReady(): boolean;
get isPubSubActive(): boolean;
get v4(): Record;
constructor(options?: ValkeyClientOptions);
duplicate(overrides?: Partial>): ValkeyClientType;
connect(): Promise>;
commandsExecutor(command: C, args: Array): Promise>;
sendCommand(args: ValkeyCommandArguments, options?: ClientCommandOptions): Promise;
functionsExecuter(fn: F, args: Array, name: string): Promise>;
executeFunction(name: string, fn: ValkeyFunction, args: ValkeyCommandArguments, options?: ClientCommandOptions): Promise;
scriptsExecuter(script: S, args: Array): Promise>;
executeScript(script: ValkeyScript, args: ValkeyCommandArguments, 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) => Promise;
UNSUBSCRIBE(channels?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise;
unsubscribe: (channels?: string | Array, listener?: PubSubListener, bufferMode?: T) => Promise;
PSUBSCRIBE(patterns: string | Array, listener: PubSubListener, bufferMode?: T): Promise;
pSubscribe: (patterns: string | Array, listener: PubSubListener, bufferMode?: T) => Promise;
PUNSUBSCRIBE(patterns?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise;
pUnsubscribe: (patterns?: string | Array, listener?: PubSubListener, bufferMode?: T) => Promise;
SSUBSCRIBE(channels: string | Array, listener: PubSubListener, bufferMode?: T): Promise;
sSubscribe: (channels: string | Array, listener: PubSubListener, bufferMode?: T) => Promise;
SUNSUBSCRIBE(channels?: string | Array, listener?: PubSubListener, bufferMode?: T): Promise;
sUnsubscribe: (channels?: string | Array, listener?: PubSubListener, bufferMode?: T) => Promise;
getPubSubListeners(type: PubSubType): PubSubTypeListeners;
extendPubSubChannelListeners(type: PubSubType, channel: string, listeners: ChannelListeners): Promise;
extendPubSubListeners(type: PubSubType, listeners: PubSubTypeListeners): Promise;
QUIT(): Promise;
quit: () => Promise;
executeIsolated(fn: (client: ValkeyClientType) => T | Promise): Promise;
MULTI(): ValkeyClientMultiCommandType;
multi: () => ValkeyClientMultiCommandType;
multiExecutor(commands: Array, selectedDB?: number, 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;
ref(): void;
unref(): void;
}
export {};