| | |
| | | /** @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 |
| | | */ |
| | |
| | | } 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; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * @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} |
| | |
| | | } |
| | | |
| | | /** |
| | | * Serializes this instance into the provided serializer context. |
| | | * @param {ObjectSerializerContext} context context |
| | | */ |
| | | serialize(context) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Restores this instance from the provided deserializer context. |
| | | * @param {ObjectDeserializerContext} context context |
| | | */ |
| | | deserialize(context) { |