* Records a hoisted function declaration within a lexical environment.
(func)
| 109745 | * Records a hoisted function declaration within a lexical environment. |
| 109746 | */ |
| 109747 | function hoistFunctionDeclaration(func) { |
| 109748 | ts.Debug.assert(state > 0 /* TransformationState.Uninitialized */, "Cannot modify the lexical environment during initialization."); |
| 109749 | ts.Debug.assert(state < 2 /* TransformationState.Completed */, "Cannot modify the lexical environment after transformation has completed."); |
| 109750 | ts.setEmitFlags(func, 1048576 /* EmitFlags.CustomPrologue */); |
| 109751 | if (!lexicalEnvironmentFunctionDeclarations) { |
| 109752 | lexicalEnvironmentFunctionDeclarations = [func]; |
| 109753 | } |
| 109754 | else { |
| 109755 | lexicalEnvironmentFunctionDeclarations.push(func); |
| 109756 | } |
| 109757 | } |
| 109758 | /** |
| 109759 | * Adds an initialization statement to the top of the lexical environment. |
| 109760 | */ |
no test coverage detected
searching dependent graphs…