/// import COMMANDS from './commands'; import { RedisCommand, RedisCommandArgument, RedisCommandArguments, RedisCommandRawReply, RedisCommandReply, RedisModules, RedisPlugins, RedisScript, RedisScripts } from '../commands'; import { RedisSocketOptions } from './socket'; import { PubSubListener, QueueCommandOptions } from './commands-queue'; import { RedisClientMultiCommandType } from './multi-command'; import { RedisMultiQueuedCommand } from '../multi-command'; import { EventEmitter } from 'events'; import { CommandOptions } from '../command-options'; import { ScanOptions, ZMember } from '../commands/generic-transformers'; import { ScanCommandOptions } from '../commands/SCAN'; import { HScanTuple } from '../commands/HSCAN'; import { Options as PoolOptions } from 'generic-pool'; export interface RedisClientOptions, S extends RedisScripts = Record> extends RedisPlugins { url?: string; socket?: RedisSocketOptions; username?: string; password?: string; name?: string; database?: number; commandsQueueMaxLength?: number; disableOfflineQueue?: boolean; readonly?: boolean; legacyMode?: boolean; isolationPoolOptions?: PoolOptions; } declare type ConvertArgumentType = Type extends RedisCommandArgument ? (Type extends (string & ToType) ? Type : ToType) : (Type extends Set ? Set> : (Type extends Map ? Map> : (Type extends Array ? Array> : (Type extends Date ? Type : (Type extends Record ? { [Property in keyof Type]: ConvertArgumentType; } : Type))))); export declare type RedisClientCommandSignature = Parameters> = >(...args: Params | [options: Options, ...rest: Params]) => Promise, Options['returnBuffers'] extends true ? Buffer : string>>; declare type WithCommands = { [P in keyof typeof COMMANDS]: RedisClientCommandSignature<(typeof COMMANDS)[P]>; }; export declare type ExcludeMappedString = string extends S ? never : S; export declare type WithModules = { [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 {};