We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 971a4c5 commit 91c1a81Copy full SHA for 91c1a81
src/compiler/checker.ts
@@ -6704,7 +6704,13 @@ module ts {
6704
if (parent.kind === SyntaxKind.TypeQuery) {
6705
return false;
6706
}
6707
- if (isTypeNode(parent)) {
+ // Do not recursively call isTypeNode on the parent. In the example:
6708
+ //
6709
+ // var a: A.B.C;
6710
6711
+ // Calling isTypeNode would consider the qualified name A.B a type node. Only C or
6712
+ // A.B.C is a type node.
6713
+ if (node.kind >= SyntaxKind.FirstTypeNode && node.kind <= SyntaxKind.LastTypeNode) {
6714
return true;
6715
6716
switch (parent.kind) {
0 commit comments