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

Function getEntityNameFromTypeNode

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

Source from the content-addressed store, hash-verified

16080 }
16081 ts.isThisInitializedObjectBindingExpression = isThisInitializedObjectBindingExpression;
16082 function getEntityNameFromTypeNode(node) {
16083 switch (node.kind) {
16084 case 178 /* SyntaxKind.TypeReference */:
16085 return node.typeName;
16086 case 228 /* SyntaxKind.ExpressionWithTypeArguments */:
16087 return isEntityNameExpression(node.expression)
16088 ? node.expression
16089 : undefined;
16090 // TODO(rbuckton): These aren't valid TypeNodes, but we treat them as such because of `isPartOfTypeNode`, which returns `true` for things that aren't `TypeNode`s.
16091 case 79 /* SyntaxKind.Identifier */:
16092 case 161 /* SyntaxKind.QualifiedName */:
16093 return node;
16094 }
16095 return undefined;
16096 }
16097 ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
16098 function getInvokedExpression(node) {
16099 switch (node.kind) {

Callers

nothing calls this directly

Calls 1

isEntityNameExpressionFunction · 0.85

Tested by

no test coverage detected