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

Function isTopLevelFunctionDeclaration

test/fixtures/snapshot/typescript.js:141431–141444  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

141429 return false;
141430 }
141431 function isTopLevelFunctionDeclaration(item) {
141432 if (!item.node.body) {
141433 return false;
141434 }
141435 switch (navigationBarNodeKind(item.parent)) {
141436 case 262 /* SyntaxKind.ModuleBlock */:
141437 case 305 /* SyntaxKind.SourceFile */:
141438 case 169 /* SyntaxKind.MethodDeclaration */:
141439 case 171 /* SyntaxKind.Constructor */:
141440 return true;
141441 default:
141442 return false;
141443 }
141444 }
141445 }
141446 }
141447 function convertToTree(n) {

Callers 1

Calls 1

navigationBarNodeKindFunction · 0.85

Tested by

no test coverage detected