* Appends the exports of a VariableDeclaration or BindingElement to a statement list, * returning the statement list. * * @param statements A statement list to which the down-level export statements are to be * appended. If `statements` is `undefined`, a new array
(statements, decl)
| 105474 | * @param decl The declaration whose exports are to be recorded. |
| 105475 | */ |
| 105476 | function appendExportsOfBindingElement(statements, decl) { |
| 105477 | if (currentModuleInfo.exportEquals) { |
| 105478 | return statements; |
| 105479 | } |
| 105480 | if (ts.isBindingPattern(decl.name)) { |
| 105481 | for (var _i = 0, _a = decl.name.elements; _i < _a.length; _i++) { |
| 105482 | var element = _a[_i]; |
| 105483 | if (!ts.isOmittedExpression(element)) { |
| 105484 | statements = appendExportsOfBindingElement(statements, element); |
| 105485 | } |
| 105486 | } |
| 105487 | } |
| 105488 | else if (!ts.isGeneratedIdentifier(decl.name)) { |
| 105489 | statements = appendExportsOfDeclaration(statements, decl); |
| 105490 | } |
| 105491 | return statements; |
| 105492 | } |
| 105493 | /** |
| 105494 | * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, |
| 105495 | * returning the statement list. |
no test coverage detected