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

Function isResolvedByTypeAlias

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

Source from the content-addressed store, hash-verified

60832 // resolve their constituent types. We include SyntaxKind.TypeReference because type arguments
60833 // of type aliases are eagerly resolved.
60834 function isResolvedByTypeAlias(node) {
60835 var parent = node.parent;
60836 switch (parent.kind) {
60837 case 191 /* SyntaxKind.ParenthesizedType */:
60838 case 197 /* SyntaxKind.NamedTupleMember */:
60839 case 178 /* SyntaxKind.TypeReference */:
60840 case 187 /* SyntaxKind.UnionType */:
60841 case 188 /* SyntaxKind.IntersectionType */:
60842 case 194 /* SyntaxKind.IndexedAccessType */:
60843 case 189 /* SyntaxKind.ConditionalType */:
60844 case 193 /* SyntaxKind.TypeOperator */:
60845 case 183 /* SyntaxKind.ArrayType */:
60846 case 184 /* SyntaxKind.TupleType */:
60847 return isResolvedByTypeAlias(parent);
60848 case 259 /* SyntaxKind.TypeAliasDeclaration */:
60849 return true;
60850 }
60851 return false;
60852 }
60853 // Return true if resolving the given node (i.e. getTypeFromTypeNode) possibly causes resolution
60854 // of a type alias.
60855 function mayResolveTypeAlias(node) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…