WXL
3 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/DependencyTemplates.js
@@ -10,21 +10,24 @@
/** @typedef {import("./Compilation").DependencyConstructor} DependencyConstructor */
/** @typedef {import("./DependencyTemplate")} DependencyTemplate */
/** @typedef {typeof import("./util/Hash")} Hash */
/** @typedef {import("./util/Hash").HashFunction} HashFunction */
class DependencyTemplates {
   /**
    * @param {string | Hash} hashFunction the hash function to use
    * Creates an instance of DependencyTemplates.
    * @param {HashFunction} hashFunction the hash function to use
    */
   constructor(hashFunction = DEFAULTS.HASH_FUNCTION) {
      /** @type {Map<DependencyConstructor, DependencyTemplate>} */
      this._map = new Map();
      /** @type {string} */
      this._hash = "31d6cfe0d16ae931b73c59d7e0c089c0";
      /** @type {HashFunction} */
      this._hashFunction = hashFunction;
   }
   /**
    * Returns template for this dependency.
    * @param {DependencyConstructor} dependency Constructor of Dependency
    * @returns {DependencyTemplate | undefined} template for this dependency
    */
@@ -33,6 +36,7 @@
   }
   /**
    * Updates value using the provided dependency.
    * @param {DependencyConstructor} dependency Constructor of Dependency
    * @param {DependencyTemplate} dependencyTemplate template for this dependency
    * @returns {void}
@@ -42,6 +46,7 @@
   }
   /**
    * Updates the hash with the data contributed by this instance.
    * @param {string} part additional hash contributor
    * @returns {void}
    */