/// import { IEventDef } from '@allgemein/eventbus'; import { FSWatcher } from 'fs'; import { AbstractWatcherConfig } from './AbstractWatcherConfig'; /** * An abstract watcher */ export declare abstract class AbstractWatcher { /** * Event to be emitted */ protected readonly eventDef: IEventDef; /** * Name of the watcher */ protected readonly name: string; /** * List of tasks */ protected readonly taskNames: string[]; /** * Parameters for tasks */ protected readonly taskParams: any; /** * Instance of FSWatcher */ protected watcher: FSWatcher; /** * Whether or not the watcher is valid */ abstract isValid(): Promise; /** * Start the watcher */ abstract start(): Promise; /** * Stop the watcher */ abstract stop(): Promise; /** * Create a new abstract watcher * * @param config Watcher config */ protected constructor(config: AbstractWatcherConfig); /** * Emit an event * * @param params */ protected emitEvent(params: any): Promise; /** * Execute tasks */ protected executeTasks(params: any): Promise; }