WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/webpack/lib/AsyncDependenciesBlock.js
@@ -16,11 +16,11 @@
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("./util/Hash")} Hash */
/** @typedef {(ChunkGroupOptions & { entryOptions?: EntryOptions }) | string} GroupOptions */
/** @typedef {(ChunkGroupOptions & { entryOptions?: EntryOptions } & { circular?: boolean })} GroupOptions */
class AsyncDependenciesBlock extends DependenciesBlock {
   /**
    * @param {GroupOptions | null} groupOptions options for the group
    * @param {GroupOptions | string | null} groupOptions options for the group
    * @param {(DependencyLocation | null)=} loc the line of code
    * @param {(string | null)=} request the request
    */
@@ -31,9 +31,17 @@
      } else if (!groupOptions) {
         groupOptions = { name: undefined };
      }
      if (typeof groupOptions.circular !== "boolean") {
         // default allow circular references
         groupOptions.circular = true;
      }
      /** @type {GroupOptions} */
      this.groupOptions = groupOptions;
      /** @type {DependencyLocation | null | undefined} */
      this.loc = loc;
      /** @type {string | null | undefined} */
      this.request = request;
      /** @type {undefined | string} */
      this._stringifiedGroupOptions = undefined;
   }
@@ -56,6 +64,14 @@
   }
   /**
    * @returns {boolean} Whether circular references are allowed
    */
   get circular() {
      return Boolean(this.groupOptions.circular);
   }
   /**
    * Updates the hash with the data contributed by this instance.
    * @param {Hash} hash the hash used to track dependencies
    * @param {UpdateHashContext} context context
    * @returns {void}
@@ -73,6 +89,7 @@
   }
   /**
    * Serializes this instance into the provided serializer context.
    * @param {ObjectSerializerContext} context context
    */
   serialize(context) {
@@ -84,6 +101,7 @@
   }
   /**
    * Restores this instance from the provided deserializer context.
    * @param {ObjectDeserializerContext} context context
    */
   deserialize(context) {