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

Function getModuleInstanceStateForAliasTarget

test/fixtures/snapshot/typescript.js:44632–44662  ·  view source on GitHub ↗
(specifier, visited)

Source from the content-addressed store, hash-verified

44630 return 1 /* ModuleInstanceState.Instantiated */;
44631 }
44632 function getModuleInstanceStateForAliasTarget(specifier, visited) {
44633 var name = specifier.propertyName || specifier.name;
44634 var p = specifier.parent;
44635 while (p) {
44636 if (ts.isBlock(p) || ts.isModuleBlock(p) || ts.isSourceFile(p)) {
44637 var statements = p.statements;
44638 var found = void 0;
44639 for (var _i = 0, statements_2 = statements; _i < statements_2.length; _i++) {
44640 var statement = statements_2[_i];
44641 if (ts.nodeHasName(statement, name)) {
44642 if (!statement.parent) {
44643 ts.setParent(statement, p);
44644 ts.setParentRecursive(statement, /*incremental*/ false);
44645 }
44646 var state = getModuleInstanceStateCached(statement, visited);
44647 if (found === undefined || state > found) {
44648 found = state;
44649 }
44650 if (found === 1 /* ModuleInstanceState.Instantiated */) {
44651 return found;
44652 }
44653 }
44654 }
44655 if (found !== undefined) {
44656 return found;
44657 }
44658 }
44659 p = p.parent;
44660 }
44661 return 1 /* ModuleInstanceState.Instantiated */; // Couldn't locate, assume could refer to a value
44662 }
44663 var ContainerFlags;
44664 (function (ContainerFlags) {
44665 // The current node is not a container, and no container manipulation should happen before

Callers 1

Calls 1

Tested by

no test coverage detected