/** * The following code is modified based on * https://github.com/webpack/webpack/blob/4b4ca3b/lib/node/NodeWatchFileSystem.js * * MIT Licensed * Author Tobias Koppers @sokra * Copyright (c) JS Foundation and other contributors * https://github.com/webpack/webpack/blob/main/LICENSE */ import type Watchpack from '../../compiled/watchpack/index.js'; import type { FileSystemInfoEntry, InputFileSystem, Watcher, WatchFileSystem } from '../util/fs.js'; export default class NodeWatchFileSystem implements WatchFileSystem { inputFileSystem: InputFileSystem; watcherOptions: Watchpack.WatchOptions; watcher?: Watchpack; constructor(inputFileSystem: InputFileSystem); watch(files: Iterable, directories: Iterable, missing: Iterable, startTime: number, options: Watchpack.WatchOptions, callback: (error: Error | null, fileTimeInfoEntries: Map, contextTimeInfoEntries: Map, changedFiles: Set, removedFiles: Set) => void, callbackUndelayed: (fileName: string, changeTime: number) => void): Watcher; }