Skip to content

Commit

Permalink
Fix microsoft#10108 (Completion suggestion for object literal with ge…
Browse files Browse the repository at this point in the history
…tter)
  • Loading branch information
arusakov committed Oct 24, 2016
1 parent cef9d85 commit 40e0fc7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,8 @@ namespace ts.Completions {
if (m.kind !== SyntaxKind.PropertyAssignment &&
m.kind !== SyntaxKind.ShorthandPropertyAssignment &&
m.kind !== SyntaxKind.BindingElement &&
m.kind !== SyntaxKind.MethodDeclaration) {
m.kind !== SyntaxKind.MethodDeclaration &&
m.kind !== SyntaxKind.GetAccessor) {
continue;
}

Expand Down
17 changes: 17 additions & 0 deletions tests/cases/fourslash/server/completions03.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/// <reference path="../fourslash.ts"/>

// issue: https://github.com/Microsoft/TypeScript/issues/10108

//// interface Foo {
//// one: any;
//// two: any;
//// }
////
//// let x: Foo = {
//// get one() { return "" },
//// /**/
//// }

goTo.marker("");
verify.completionListContains("two");
verify.not.completionListContains("one");

0 comments on commit 40e0fc7

Please sign in to comment.