Closed Uzlopak closed 2 years ago
Hereby I propose following typings for typescript:
import events = require('events'); interface RedisOptions { host: string; port: number; db: number; auth: false | string; maxRetries: number; tryToReconnect: boolean; reconnectTimeout: number; autoConnect: boolean; doNotSetClientName: boolean; doNotRunQuitOnEnd: boolean; } type Callback<T = string> = (err: Error | null, result: T) => void; declare class Redis extends events.EventEmitter { constructor(opts?: RedisOptions): void; init(): void; connect(): void; processQueue(): void; reconnect(): void; selectDb(cb: Callback): void; sendAuth(cb: Callback): void; rawCall<T = string>(args: (string | Buffer)[], cb?: Callback<T>): void; rawCallAsync<T = string>(args: (string | Buffer)[]): Promise<T>; end(): void; }
Thanks!
Published to npm v2.1.6
Hereby I propose following typings for typescript: