You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Specialized signatures can have string literals as their parameters' type names
7246
+
returnnode.parent.kind===SyntaxKind.Parameter;
7247
+
7248
+
// Identifiers and qualified names may be type nodes, depending on their context. Climb
7249
+
// above them to find the lowest container
7250
+
caseSyntaxKind.Identifier:
7251
+
// If the identifier is the RHS of a qualified name, then it's a type iff its parent is.
7252
+
if(node.parent.kind===SyntaxKind.QualifiedName){
7253
+
node=node.parent;
7254
+
}
7255
+
// fall through
7256
+
caseSyntaxKind.QualifiedName:
7257
+
// At this point, node is either a qualified name or an identifier
7258
+
Debug.assert(node.kind===SyntaxKind.Identifier||node.kind===SyntaxKind.QualifiedName,"'node' was expected to be a qualified name or identifier in 'isTypeNode'.");
7259
+
7260
+
varparent=node.parent;
7261
+
if(parent.kind===SyntaxKind.TypeQuery){
7262
+
returnfalse;
7263
+
}
7264
+
// Do not recursively call isTypeNode on the parent. In the example:
7265
+
//
7266
+
// var a: A.B.C;
7267
+
//
7268
+
// Calling isTypeNode would consider the qualified name A.B a type node. Only C or
0 commit comments