fix(types): use type
import (#5)
This commit is contained in:
parent
3cd7f48ff6
commit
e2484101e8
8
types/CheapWatch.d.ts
vendored
8
types/CheapWatch.d.ts
vendored
@ -1,17 +1,17 @@
|
||||
import * as EventEmitter from 'events';
|
||||
import * as fs from 'fs';
|
||||
import type { Stats } from 'fs';
|
||||
import type { EventEmitter } from 'events';
|
||||
|
||||
export default class CheapWatch extends EventEmitter {
|
||||
dir: string;
|
||||
filter?: Filter;
|
||||
watch: boolean;
|
||||
debounce: number;
|
||||
paths: Map<string, fs.Stats>;
|
||||
paths: Map<string, Stats>;
|
||||
constructor(data: object);
|
||||
init(): Promise<void>;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
interface Filter {
|
||||
(file: { path: string; stats: fs.Stats }): Promise<boolean>;
|
||||
(file: { path: string; stats: Stats }): Promise<boolean>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user