* Hoists the declared names of a VariableDeclaration or BindingElement. * * @param node The declaration to hoist.
(node)
| 106387 | * @param node The declaration to hoist. |
| 106388 | */ |
| 106389 | function hoistBindingElement(node) { |
| 106390 | if (ts.isBindingPattern(node.name)) { |
| 106391 | for (var _i = 0, _a = node.name.elements; _i < _a.length; _i++) { |
| 106392 | var element = _a[_i]; |
| 106393 | if (!ts.isOmittedExpression(element)) { |
| 106394 | hoistBindingElement(element); |
| 106395 | } |
| 106396 | } |
| 106397 | } |
| 106398 | else { |
| 106399 | hoistVariableDeclaration(factory.cloneNode(node.name)); |
| 106400 | } |
| 106401 | } |
| 106402 | /** |
| 106403 | * Determines whether a VariableDeclarationList should be hoisted. |
| 106404 | * |
no test coverage detected