* Appends the exports of an ImportDeclaration 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 is allocated if st
(statements, decl)
| 105404 | * @param decl The declaration whose exports are to be recorded. |
| 105405 | */ |
| 105406 | function appendExportsOfImportDeclaration(statements, decl) { |
| 105407 | if (currentModuleInfo.exportEquals) { |
| 105408 | return statements; |
| 105409 | } |
| 105410 | var importClause = decl.importClause; |
| 105411 | if (!importClause) { |
| 105412 | return statements; |
| 105413 | } |
| 105414 | if (importClause.name) { |
| 105415 | statements = appendExportsOfDeclaration(statements, importClause); |
| 105416 | } |
| 105417 | var namedBindings = importClause.namedBindings; |
| 105418 | if (namedBindings) { |
| 105419 | switch (namedBindings.kind) { |
| 105420 | case 268 /* SyntaxKind.NamespaceImport */: |
| 105421 | statements = appendExportsOfDeclaration(statements, namedBindings); |
| 105422 | break; |
| 105423 | case 269 /* SyntaxKind.NamedImports */: |
| 105424 | for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) { |
| 105425 | var importBinding = _a[_i]; |
| 105426 | statements = appendExportsOfDeclaration(statements, importBinding, /* liveBinding */ true); |
| 105427 | } |
| 105428 | break; |
| 105429 | } |
| 105430 | } |
| 105431 | return statements; |
| 105432 | } |
| 105433 | /** |
| 105434 | * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the |
| 105435 | * statement list. |
no test coverage detected