watch-file-system.d.ts 525 B

12345678910111213141516
  1. /// <reference types="node" />
  2. import type { EventEmitter } from 'events';
  3. import type webpack from 'webpack';
  4. interface Watchpack extends EventEmitter {
  5. _onChange(item: string, mtime: number, file: string, type?: string): void;
  6. _onRemove(item: string, file: string, type?: string): void;
  7. }
  8. declare type Watch = webpack.Compiler['watchFileSystem']['watch'];
  9. interface WatchFileSystem {
  10. watcher?: Watchpack;
  11. wfs?: {
  12. watcher: Watchpack;
  13. };
  14. watch: Watch;
  15. }
  16. export { WatchFileSystem, Watchpack };