WXL
3 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
node_modules/webpack/lib/dependencies/HarmonyAcceptDependency.js
@@ -24,6 +24,7 @@
class HarmonyAcceptDependency extends NullDependency {
   /**
    * Creates an instance of HarmonyAcceptDependency.
    * @param {Range} range expression range
    * @param {HarmonyAcceptImportDependency[]} dependencies import dependencies
    * @param {boolean} hasCallback true, if the range wraps an existing callback
@@ -40,6 +41,7 @@
   }
   /**
    * Serializes this instance into the provided serializer context.
    * @param {ObjectSerializerContext} context context
    */
   serialize(context) {
@@ -51,6 +53,7 @@
   }
   /**
    * Restores this instance from the provided deserializer context.
    * @param {ObjectDeserializerContext} context context
    */
   deserialize(context) {
@@ -71,6 +74,7 @@
   NullDependency.Template
) {
   /**
    * Applies the plugin by registering its hooks on the compiler.
    * @param {Dependency} dependency the dependency for which the template should be applied
    * @param {ReplaceSource} source the current replace source which can be modified
    * @param {DependencyTemplateContext} templateContext the context object
@@ -88,6 +92,7 @@
      } = templateContext;
      /**
       * Gets dependency module id.
       * @param {Dependency} dependency the dependency to get module id for
       * @returns {ModuleId | null} the module id or null if not found
       */
@@ -97,6 +102,7 @@
         );
      /**
       * Checks whether this harmony accept dependency is related harmony import dependency.
       * @param {Dependency} a the first dependency
       * @param {Dependency} b the second dependency
       * @returns {boolean} true if the dependencies are related
@@ -114,8 +120,11 @@
       * @returns {HarmonyImportDependency[]} array of related harmony import dependencies
       */
      const getHarmonyImportDependencies = (dependency) => {
         /** @type {HarmonyImportDependency[]} */
         const result = [];
         /** @type {HarmonyImportDependency | null} */
         let deferDependency = null;
         /** @type {HarmonyImportDependency | null} */
         let noDeferredDependency = null;
         for (const d of module.dependencies) {