Skip to content

Commit 0af16a5

Browse files
committed
Anonymous typeliteral is not used in qualification
1 parent 90e2c36 commit 0af16a5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/compiler/checker.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,6 +1013,11 @@ module ts {
10131013
return;
10141014
}
10151015

1016+
// if this is anonymous type break
1017+
if (symbol.flags & SymbolFlags.TypeLiteral) {
1018+
return;
1019+
}
1020+
10161021
if (needsDot) {
10171022
writePunctuation(writer, SyntaxKind.DotToken);
10181023
}

tests/cases/fourslash/completionListObjectMembers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
////object./**/
1111

1212
goTo.marker();
13-
verify.memberListContains("bar", 'any');
14-
verify.memberListContains("foo", '(bar: any) => any');
13+
verify.memberListContains("bar", '(property) bar: any');
14+
verify.memberListContains("foo", '(method) foo(bar: any): any');

0 commit comments

Comments
 (0)