| | |
| | | /** @typedef {Set<string>} Declarations */ |
| | | |
| | | /** |
| | | * Collect declaration. |
| | | * @param {Declarations} declarations set of declarations |
| | | * @param {Identifier | Pattern} pattern pattern to collect declarations from |
| | | */ |
| | |
| | | }; |
| | | |
| | | /** |
| | | * Gets hoisted declarations. |
| | | * @param {Statement} branch branch to get hoisted declarations from |
| | | * @param {boolean} includeFunctionDeclarations whether to include function declarations |
| | | * @returns {string[]} hoisted declarations |
| | |
| | | |
| | | class ConstPlugin { |
| | | /** |
| | | * Apply the plugin |
| | | * Applies the plugin by registering its hooks on the compiler. |
| | | * @param {Compiler} compiler the compiler instance |
| | | * @returns {void} |
| | | */ |
| | |
| | | ); |
| | | |
| | | /** |
| | | * Handles the hook callback for this code path. |
| | | * @param {JavascriptParser} parser the parser |
| | | */ |
| | | const handler = (parser) => { |