Browse Source

add typescript declaration file

master
Conduitry 1 year ago
parent
commit
9afd86d50d
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      types/CheapWatch.d.ts

+ 17
- 0
types/CheapWatch.d.ts View File

@ -0,0 +1,17 @@
import * as EventEmitter from 'events';
import * as fs from 'fs';
export default class CheapWatch extends EventEmitter {
dir: string;
filter?: Filter;
watch: boolean;
debounce: number;
paths: Map<string, fs.Stats>;
constructor(data: object);
init(): Promise<void>;
close(): void;
}
interface Filter {
(file: { path: string; stats: fs.Stats }): Promise<boolean>;
}

Loading…
Cancel
Save