mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 17:41:26 -06:00
Merge pull request #32726 from fuafa/completion-after-private
Fix completion disappear after a property declaration with a private modifier
This commit is contained in:
commit
c8d937ecd3
@ -1566,7 +1566,7 @@ namespace ts.Completions {
|
||||
// If you're in an interface you don't want to repeat things from super-interface. So just stop here.
|
||||
if (!isClassLike(decl)) return GlobalsSearch.Success;
|
||||
|
||||
const classElement = contextToken.parent;
|
||||
const classElement = contextToken.kind === SyntaxKind.SemicolonToken ? contextToken.parent.parent : contextToken.parent;
|
||||
let classElementModifierFlags = isClassElement(classElement) ? getModifierFlags(classElement) : ModifierFlags.None;
|
||||
// If this is context token is not something we are editing now, consider if this would lead to be modifier
|
||||
if (contextToken.kind === SyntaxKind.Identifier && !isCurrentlyEditingNode(contextToken)) {
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// interface X {
|
||||
//// bla: string;
|
||||
//// }
|
||||
//// class Y implements X {
|
||||
//// private blub = "";
|
||||
//// /**/
|
||||
//// }
|
||||
|
||||
|
||||
verify.completions({ marker: "", includes: "bla", isNewIdentifierLocation: true });
|
||||
Loading…
x
Reference in New Issue
Block a user