WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/node/NodeWatchFileSystem.js
@@ -8,6 +8,8 @@
const util = require("util");
const Watchpack = require("watchpack");
/** @typedef {import("watchpack").TimeInfoEntries} TimeInfoEntries */
/** @typedef {import("watchpack").WatchOptions} WatchOptions */
/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */
/** @typedef {import("../util/fs").WatchMethod} WatchMethod */
/** @typedef {import("../util/fs").Changes} Changes */
@@ -15,10 +17,13 @@
class NodeWatchFileSystem {
   /**
    * Creates an instance of NodeWatchFileSystem.
    * @param {InputFileSystem} inputFileSystem input filesystem
    */
   constructor(inputFileSystem) {
      /** @type {InputFileSystem} */
      this.inputFileSystem = inputFileSystem;
      /** @type {WatchOptions} */
      this.watcherOptions = {
         aggregateTimeout: 0
      };
@@ -65,7 +70,9 @@
      }
      const fetchTimeInfo = () => {
         /** @type {TimeInfoEntries} */
         const fileTimeInfoEntries = new Map();
         /** @type {TimeInfoEntries} */
         const contextTimeInfoEntries = new Map();
         if (this.watcher) {
            this.watcher.collectTimeInfoEntries(
@@ -78,6 +85,7 @@
      this.watcher.once(
         "aggregated",
         /**
          * Handles the callback logic for this hook.
          * @param {Changes} changes changes
          * @param {Removals} removals removals
          */