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

Function inSameLexicalScope

test/fixtures/snapshot/typescript.js:84914–84926  ·  view source on GitHub ↗
(node1, node2)

Source from the content-addressed store, hash-verified

84912 return undefined;
84913 }
84914 function inSameLexicalScope(node1, node2) {
84915 var container1 = ts.getEnclosingBlockScopeContainer(node1);
84916 var container2 = ts.getEnclosingBlockScopeContainer(node2);
84917 if (isGlobalSourceFile(container1)) {
84918 return isGlobalSourceFile(container2);
84919 }
84920 else if (isGlobalSourceFile(container2)) {
84921 return false;
84922 }
84923 else {
84924 return container1 === container2;
84925 }
84926 }
84927 function checkModuleDeclaration(node) {
84928 if (node.body) {
84929 checkSourceElement(node.body);

Callers 1

Calls 1

isGlobalSourceFileFunction · 0.85

Tested by

no test coverage detected