| | |
| | | /** @typedef {import("../Compiler")} Compiler */ |
| | | |
| | | /** |
| | | * Defines the memory with gc cache plugin options type used by this module. |
| | | * @typedef {object} MemoryWithGcCachePluginOptions |
| | | * @property {number} maxGenerations max generations |
| | | */ |
| | |
| | | |
| | | class MemoryWithGcCachePlugin { |
| | | /** |
| | | * Creates an instance of MemoryWithGcCachePlugin. |
| | | * @param {MemoryWithGcCachePluginOptions} options options |
| | | */ |
| | | constructor({ maxGenerations }) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * Apply the plugin |
| | | * Applies the plugin by registering its hooks on the compiler. |
| | | * @param {Compiler} compiler the compiler instance |
| | | * @returns {void} |
| | | */ |
| | |
| | | compiler.hooks.afterDone.tap(PLUGIN_NAME, () => { |
| | | generation++; |
| | | let clearedEntries = 0; |
| | | /** @type {undefined | string} */ |
| | | let lastClearedIdentifier; |
| | | // Avoid coverage problems due indirect changes |
| | | /* istanbul ignore next */ |