MCPcopy Create free account
hub / github.com/nodejs/node / getNamesOfDeclaration

Function getNamesOfDeclaration

test/fixtures/snapshot/typescript.js:54167–54172  ·  view source on GitHub ↗
(statement)

Source from the content-addressed store, hash-verified

54165 return !!node && node.kind === 79 /* SyntaxKind.Identifier */;
54166 }
54167 function getNamesOfDeclaration(statement) {
54168 if (ts.isVariableStatement(statement)) {
54169 return ts.filter(ts.map(statement.declarationList.declarations, ts.getNameOfDeclaration), isIdentifierAndNotUndefined);
54170 }
54171 return ts.filter([ts.getNameOfDeclaration(statement)], isIdentifierAndNotUndefined);
54172 }
54173 function flattenExportAssignedNamespace(statements) {
54174 var exportAssignment = ts.find(statements, ts.isExportAssignment);
54175 var nsIndex = ts.findIndex(statements, ts.isModuleDeclaration);

Callers 1

Calls 2

filterMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected