Add string properties declaration to the completion list

This commit is contained in:
Alexander T
2019-05-23 11:08:19 +03:00
parent 66d4010234
commit 6cd992132d
2 changed files with 21 additions and 0 deletions
+3
View File
@@ -965,6 +965,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 },
});