mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 11:50:54 -06:00
Merge pull request #39379 from a-tarasyuk/bug/39346
fix(39346): Intelligent code completion not working in child class with composited base interface
This commit is contained in:
commit
77bf2045d8
@ -2432,7 +2432,7 @@ namespace ts.Completions {
|
||||
!existingMemberNames.has(propertySymbol.escapedName) &&
|
||||
!!propertySymbol.declarations &&
|
||||
!(getDeclarationModifierFlagsFromSymbol(propertySymbol) & ModifierFlags.Private) &&
|
||||
!isPrivateIdentifierPropertyDeclaration(propertySymbol.valueDeclaration));
|
||||
!(propertySymbol.valueDeclaration && isPrivateIdentifierPropertyDeclaration(propertySymbol.valueDeclaration)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
43
tests/cases/fourslash/completionListInheritedClassMembers.ts
Normal file
43
tests/cases/fourslash/completionListInheritedClassMembers.ts
Normal file
@ -0,0 +1,43 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
// @filename: a.ts
|
||||
////interface I {
|
||||
//// m2(): void;
|
||||
//// m3(): void;
|
||||
////}
|
||||
////
|
||||
////type T1 = I;
|
||||
////export interface A1 extends T1 {
|
||||
//// m1(): void;
|
||||
////}
|
||||
////export class A1 {}
|
||||
////
|
||||
////type T2 = Partial<I>
|
||||
////export interface A2 extends T2 {
|
||||
//// m1(): void;
|
||||
////}
|
||||
////export class A2 {}
|
||||
////
|
||||
////type T3 = Pick<I, "m3">
|
||||
////export interface A3 extends T3 {
|
||||
//// m1(): void;
|
||||
////}
|
||||
////export class A3 {}
|
||||
|
||||
// @filename: b.ts
|
||||
////import { A1, A2, A3 } from './a';
|
||||
////class B1 extends A1 {
|
||||
//// /*1*/
|
||||
////}
|
||||
////class B2 extends A2 {
|
||||
//// /*2*/
|
||||
////}
|
||||
////class B3 extends A3 {
|
||||
//// /*3*/
|
||||
////}
|
||||
|
||||
verify.completions(
|
||||
{ marker: "1", exact: ["m1", "m2", "m3", ...completion.classElementKeywords], isNewIdentifierLocation: true },
|
||||
{ marker: "2", exact: ["m1", "m2", "m3", ...completion.classElementKeywords], isNewIdentifierLocation: true },
|
||||
{ marker: "3", exact: ["m1", "m3", ...completion.classElementKeywords], isNewIdentifierLocation: true }
|
||||
);
|
||||
Loading…
x
Reference in New Issue
Block a user