mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 20:25:48 -06:00
Merge pull request #31290 from a-tarasyuk/bug/29880
29880 - No completions for computed string properties
This commit is contained in:
commit
79aff027f3
@ -1036,6 +1036,9 @@ namespace ts.Completions {
|
||||
symbolToOriginInfoMap[getSymbolId(firstAccessibleSymbol)] =
|
||||
!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) ? { kind: SymbolOriginInfoKind.SymbolMemberNoExport } : { kind: SymbolOriginInfoKind.SymbolMemberExport, moduleSymbol, isDefaultExport: false };
|
||||
}
|
||||
else if (preferences.includeCompletionsWithInsertText) {
|
||||
symbols.push(symbol);
|
||||
}
|
||||
}
|
||||
else {
|
||||
symbols.push(symbol);
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
//// const p2 = "p2";
|
||||
//// interface A {
|
||||
//// ["p1"]: string;
|
||||
//// [p2]: string;
|
||||
//// }
|
||||
//// declare const a: A;
|
||||
//// a[|./**/|]
|
||||
|
||||
verify.completions({
|
||||
marker: "",
|
||||
exact: [
|
||||
{ name: "p1" },
|
||||
{ name: "p2", insertText: '[p2]', replacementSpan: test.ranges()[0] },
|
||||
],
|
||||
preferences: { includeInsertTextCompletions: true },
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user