| | |
| | | /** @typedef {import("./TemplatedPathPlugin").TemplatePath} TemplatePath */ |
| | | /** @typedef {import("./TemplatedPathPlugin").PathData} PathData */ |
| | | /** |
| | | * Defines the if set type used by this module. |
| | | * @template T |
| | | * @typedef {import("tapable").IfSet<T>} IfSet |
| | | */ |
| | |
| | | // TODO webpack 6 remove this class |
| | | class MainTemplate { |
| | | /** |
| | | * Creates an instance of MainTemplate. |
| | | * @param {OutputOptions} outputOptions output options for the MainTemplate |
| | | * @param {Compilation} compilation the compilation |
| | | */ |
| | |
| | | renderManifest: { |
| | | tap: util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @template AdditionalOptions |
| | | * @param {string | Tap & IfSet<AdditionalOptions>} options options |
| | | * @param {(renderManifestEntries: RenderManifestEntry[], renderManifestOptions: RenderManifestOptions) => RenderManifestEntry[]} fn fn |
| | |
| | | require: { |
| | | tap: util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @template AdditionalOptions |
| | | * @param {string | Tap & IfSet<AdditionalOptions>} options options |
| | | * @param {(value: string, renderBootstrapContext: RenderBootstrapContext) => string} fn fn |
| | |
| | | render: { |
| | | tap: util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @template AdditionalOptions |
| | | * @param {string | Tap & IfSet<AdditionalOptions>} options options |
| | | * @param {(source: Source, chunk: Chunk, hash: string | undefined, moduleTemplate: ModuleTemplate, dependencyTemplates: DependencyTemplates) => Source} fn fn |
| | |
| | | renderWithEntry: { |
| | | tap: util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @template AdditionalOptions |
| | | * @param {string | Tap & IfSet<AdditionalOptions>} options options |
| | | * @param {(source: Source, chunk: Chunk, hash: string | undefined) => Source} fn fn |
| | |
| | | assetPath: { |
| | | tap: util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @template AdditionalOptions |
| | | * @param {string | Tap & IfSet<AdditionalOptions>} options options |
| | | * @param {(value: string, path: PathData, assetInfo: AssetInfo | undefined) => string} fn fn |
| | |
| | | ), |
| | | call: util.deprecate( |
| | | /** |
| | | * Handles the call callback for this hook. |
| | | * @param {TemplatePath} filename used to get asset path with hash |
| | | * @param {PathData} options context data |
| | | * @returns {string} interpolated path |
| | |
| | | hash: { |
| | | tap: util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @template AdditionalOptions |
| | | * @param {string | Tap & IfSet<AdditionalOptions>} options options |
| | | * @param {(hash: Hash) => void} fn fn |
| | |
| | | hashForChunk: { |
| | | tap: util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @template AdditionalOptions |
| | | * @param {string | Tap & IfSet<AdditionalOptions>} options options |
| | | * @param {(hash: Hash, chunk: Chunk) => void} fn fn |
| | |
| | | |
| | | this.renderCurrentHashCode = util.deprecate( |
| | | /** |
| | | * Handles the require ensure callback for this hook. |
| | | * @deprecated |
| | | * @param {string} hash the hash |
| | | * @param {number=} length length of the hash |
| | |
| | | |
| | | this.getPublicPath = util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @param {PathData} options context data |
| | | * @returns {string} interpolated path |
| | | */ (options) => |
| | |
| | | |
| | | this.getAssetPath = util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @param {TemplatePath} path used to get asset path with hash |
| | | * @param {PathData} options context data |
| | | * @returns {string} interpolated path |
| | |
| | | |
| | | this.getAssetPathWithInfo = util.deprecate( |
| | | /** |
| | | * Handles the callback logic for this hook. |
| | | * @param {TemplatePath} path used to get asset path with hash |
| | | * @param {PathData} options context data |
| | | * @returns {InterpolatedPathAndAssetInfo} interpolated path and asset info |
| | |
| | | Object.defineProperty(MainTemplate.prototype, "outputOptions", { |
| | | get: util.deprecate( |
| | | /** |
| | | * Returns output options. |
| | | * @this {MainTemplate} |
| | | * @returns {OutputOptions} output options |
| | | */ |