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

Function isTopLevelDeclarationStatement

test/fixtures/snapshot/typescript.js:162577–162580  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

162575 return ts.isVariableDeclaration(node) ? node.parent.parent.parent : node.parent;
162576 }
162577 function isTopLevelDeclarationStatement(node) {
162578 ts.Debug.assert(ts.isSourceFile(node.parent), "Node parent should be a SourceFile");
162579 return isNonVariableTopLevelDeclaration(node) || ts.isVariableStatement(node);
162580 }
162581 function isNonVariableTopLevelDeclaration(node) {
162582 switch (node.kind) {
162583 case 256 /* SyntaxKind.FunctionDeclaration */:

Callers 1

addExportsFunction · 0.85

Calls 2

assertMethod · 0.80

Tested by

no test coverage detected