Skip to content

Commit b4f4dad

Browse files
Merge pull request #5979 from DanCorder/5058
Fix for #5058 - Exclude implemented interface functions from autocompletion suggestions.
2 parents 7c1ef22 + c6feaa0 commit b4f4dad

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
////var imp2: I1 {
14+
//// a: () => {},
15+
//// /*1*/
16+
////}
17+
18+
goTo.marker("0");
19+
verify.not.completionListContains("a");
20+
goTo.marker("1");
21+
verify.not.completionListContains("a");

0 commit comments

Comments
 (0)