MCPcopy Index your code
hub / github.com/nodejs/node / appendExportsOfDeclaration

Function appendExportsOfDeclaration

test/fixtures/snapshot/typescript.js:105523–105533  ·  view source on GitHub ↗

* Appends the exports of a declaration 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 statements are

(statements, decl, liveBinding)

Source from the content-addressed store, hash-verified

105521 * @param decl The declaration to export.
105522 */
105523 function appendExportsOfDeclaration(statements, decl, liveBinding) {
105524 var name = factory.getDeclarationName(decl);
105525 var exportSpecifiers = currentModuleInfo.exportSpecifiers.get(ts.idText(name));
105526 if (exportSpecifiers) {
105527 for (var _i = 0, exportSpecifiers_1 = exportSpecifiers; _i < exportSpecifiers_1.length; _i++) {
105528 var exportSpecifier = exportSpecifiers_1[_i];
105529 statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name, /* allowComments */ undefined, liveBinding);
105530 }
105531 }
105532 return statements;
105533 }
105534 /**
105535 * Appends the down-level representation of an export to a statement list, returning the
105536 * statement list.

Calls 2

appendExportStatementFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected