import { EventEmitter } from 'node:events'; import type { Redis } from 'ioredis'; import type { WatcherEvent } from './consants'; import type { WatcherOptions } from './types'; export declare class Watcher extends EventEmitter { protected client: Redis; protected subscriberClient: Redis | undefined; protected subscribePatterns: string[]; protected options: WatcherOptions; constructor(client: Redis, options?: WatcherOptions); on(event: `${WatcherEvent}`, listener: (key: string) => any): this; on(event: 'error', listener: (error: Error) => any): this; start(): Promise; stop(): Promise; }