| | |
| | | /** @typedef {import("webpack-sources").Source} Source */ |
| | | /** @typedef {import("../Generator").GenerateContext} GenerateContext */ |
| | | |
| | | /** @typedef {Map<string, string>} Dependencies */ |
| | | |
| | | /** |
| | | * Represents AwaitDependenciesInitFragment. |
| | | * @extends {InitFragment<GenerateContext>} |
| | | */ |
| | | class AwaitDependenciesInitFragment extends InitFragment { |
| | | /** |
| | | * @param {Map<string, string>} dependencies maps an import var to an async module that needs to be awaited |
| | | * Creates an instance of AwaitDependenciesInitFragment. |
| | | * @param {Dependencies} dependencies maps an import var to an async module that needs to be awaited |
| | | */ |
| | | constructor(dependencies) { |
| | | super( |
| | |
| | | 0, |
| | | "await-dependencies" |
| | | ); |
| | | /** @type {Dependencies} */ |
| | | this.dependencies = dependencies; |
| | | } |
| | | |
| | | /** |
| | | * Merges another await-dependencies fragment into this fragment. |
| | | * @param {AwaitDependenciesInitFragment} other other AwaitDependenciesInitFragment |
| | | * @returns {AwaitDependenciesInitFragment} AwaitDependenciesInitFragment |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the source code that will be included as initialization code. |
| | | * @param {GenerateContext} context context |
| | | * @returns {string | Source | undefined} the source code that will be included as initialization code |
| | | */ |