Skip to content

Commit ff4147a

Browse files
committed
Fix for #5058 - Exclude implemented interface functions from autocompletion suggestions.
1 parent 2ef436f commit ff4147a

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/services/services.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3751,7 +3751,8 @@ namespace ts {
37513751
// Ignore omitted expressions for missing members
37523752
if (m.kind !== SyntaxKind.PropertyAssignment &&
37533753
m.kind !== SyntaxKind.ShorthandPropertyAssignment &&
3754-
m.kind !== SyntaxKind.BindingElement) {
3754+
m.kind !== SyntaxKind.BindingElement &&
3755+
m.kind !== SyntaxKind.MethodDeclaration) {
37553756
continue;
37563757
}
37573758

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
////interface I1 {
4+
//// a(): void;
5+
//// b(): void;
6+
////}
7+
////
8+
////var imp1: I1 {
9+
//// a() {},
10+
//// /*0*/
11+
////}
12+
////
13+
////interface I2 {
14+
//// a(): void;
15+
//// b(): void;
16+
////}
17+
////
18+
////var imp2: I2 {
19+
//// a: () => {},
20+
//// /*1*/
21+
////}
22+
23+
goTo.marker("0");
24+
verify.not.completionListContains("a");
25+
goTo.marker("1");
26+
verify.not.completionListContains("a");

0 commit comments

Comments
 (0)