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

Function isNonGenericTopLevelType

test/fixtures/snapshot/typescript.js:68157–68163  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

68155 return result;
68156 }
68157 function isNonGenericTopLevelType(type) {
68158 if (type.aliasSymbol && !type.aliasTypeArguments) {
68159 var declaration = ts.getDeclarationOfKind(type.aliasSymbol, 259 /* SyntaxKind.TypeAliasDeclaration */);
68160 return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 305 /* SyntaxKind.SourceFile */ ? true : n.kind === 261 /* SyntaxKind.ModuleDeclaration */ ? false : "quit"; }));
68161 }
68162 return false;
68163 }
68164 function isTypeParameterAtTopLevel(type, typeParameter) {
68165 return !!(type === typeParameter ||
68166 type.flags & 3145728 /* TypeFlags.UnionOrIntersection */ && ts.some(type.types, function (t) { return isTypeParameterAtTopLevel(t, typeParameter); }) ||

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected