UNPKG

@remote.it/core

Version:

Core remote.it JavasScript/TypeScript library

25 lines (24 loc) 725 B
/// <reference types="node" /> import { EventEmitter } from 'events' declare type FileWatcherMessage = | 'ready' | 'created' | 'updated' | 'removed' | 'error' export interface FileWatcher { on(msg: 'ready', cb: (path: string) => void): this on(msg: 'created', cb: (path: string) => void): this on(msg: 'updated', cb: (path: string) => void): this on(msg: 'removed', cb: (path: string) => void): this on(msg: 'error', cb: (error: string) => void): this emit(msg: FileWatcherMessage, ...args: any[]): boolean } export declare class FileWatcher extends EventEmitter { location: string private watcher constructor(location: string) stop(): void } export {} //# sourceMappingURL=FileWatcher.d.ts.map