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

Function isReferencedAliasDeclaration

test/fixtures/snapshot/typescript.js:86953–86972  ·  view source on GitHub ↗
(node, checkChildren)

Source from the content-addressed store, hash-verified

86951 return isConstEnumSymbol(s) || !!s.constEnumOnlyModule;
86952 }
86953 function isReferencedAliasDeclaration(node, checkChildren) {
86954 if (isAliasSymbolDeclaration(node)) {
86955 var symbol = getSymbolOfNode(node);
86956 var links = symbol && getSymbolLinks(symbol);
86957 if (links === null || links === void 0 ? void 0 : links.referenced) {
86958 return true;
86959 }
86960 var target = getSymbolLinks(symbol).aliasTarget; // TODO: GH#18217
86961 if (target && ts.getEffectiveModifierFlags(node) & 1 /* ModifierFlags.Export */ &&
86962 target.flags & 111551 /* SymbolFlags.Value */ &&
86963 (ts.shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
86964 // An `export import ... =` of a value symbol is always considered referenced
86965 return true;
86966 }
86967 }
86968 if (checkChildren) {
86969 return !!ts.forEachChild(node, function (node) { return isReferencedAliasDeclaration(node, checkChildren); });
86970 }
86971 return false;
86972 }
86973 function isImplementationOfOverload(node) {
86974 if (ts.nodeIsPresent(node.body)) {
86975 if (ts.isGetAccessor(node) || ts.isSetAccessor(node))

Calls 5

isAliasSymbolDeclarationFunction · 0.85
getSymbolOfNodeFunction · 0.85
getSymbolLinksFunction · 0.85
forEachChildMethod · 0.80

Tested by

no test coverage detected