Skip to content

Commit 093604a

Browse files
committed
completions for setter
1 parent a5fbbdd commit 093604a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/services/completions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,8 @@ namespace ts.Completions {
15911591
m.kind !== SyntaxKind.ShorthandPropertyAssignment &&
15921592
m.kind !== SyntaxKind.BindingElement &&
15931593
m.kind !== SyntaxKind.MethodDeclaration &&
1594-
m.kind !== SyntaxKind.GetAccessor) {
1594+
m.kind !== SyntaxKind.GetAccessor &&
1595+
m.kind !== SyntaxKind.SetAccessor) {
15951596
continue;
15961597
}
15971598

tests/cases/fourslash/server/completions03.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
//// interface Foo {
66
//// one: any;
77
//// two: any;
8+
//// three: any;
89
//// }
910
////
1011
//// let x: Foo = {
1112
//// get one() { return "" },
13+
//// set two(t) {},
1214
//// /**/
1315
//// }
1416

1517
goTo.marker("");
16-
verify.completionListContains("two");
18+
verify.completionListContains("three");
1719
verify.not.completionListContains("one");
20+
verify.not.completionListContains("two");

0 commit comments

Comments
 (0)