* Visits the initializer of a ForStatement, ForInStatement, or ForOfStatement * * @param node The node to visit.
(node)
| 106810 | * @param node The node to visit. |
| 106811 | */ |
| 106812 | function visitForInitializer(node) { |
| 106813 | if (shouldHoistForInitializer(node)) { |
| 106814 | var expressions = void 0; |
| 106815 | for (var _i = 0, _a = node.declarations; _i < _a.length; _i++) { |
| 106816 | var variable = _a[_i]; |
| 106817 | expressions = ts.append(expressions, transformInitializedVariable(variable, /*isExportedDeclaration*/ false)); |
| 106818 | if (!variable.initializer) { |
| 106819 | hoistBindingElement(variable); |
| 106820 | } |
| 106821 | } |
| 106822 | return expressions ? factory.inlineExpressions(expressions) : factory.createOmittedExpression(); |
| 106823 | } |
| 106824 | else { |
| 106825 | return ts.visitNode(node, discardedValueVisitor, ts.isExpression); |
| 106826 | } |
| 106827 | } |
| 106828 | /** |
| 106829 | * Visits the body of a DoStatement to hoist declarations. |
| 106830 | * |
no test coverage detected
searching dependent graphs…