UNPKG

symspell-ex

Version:

Spelling correction & Fuzzy search based on symmetric delete spelling correction algorithm

31 lines (30 loc) 768 B
import IoRedis from 'ioredis'; export declare class RedisConfig { host: string; port: number; password: string; db: number; onConnected: () => void; constructor(host: string, port: number, password?: string, db?: number); } export declare class Redis { _config: any; _db: IoRedis.Redis; _isConnected: boolean; /** * * @param config * { * host: {type: 'string'}, * port: {type: 'number'}, * password: {type: 'string'}, * db: {type: 'number'}, * onConnected: {type: 'function'} * } */ constructor(config: RedisConfig); connect(): Promise<void>; isConnected(): Promise<boolean>; disconnect(): Promise<void>; get instance(): IoRedis.Redis; }