Verify that completion with new identifier location returns isNewIdentifierLocation: true

Fixes #24009

Signed-off-by: Sheetal Nandi <shkamat@microsoft.com>
This commit is contained in:
Sheetal Nandi 2019-01-08 16:21:46 -08:00
parent ad85e4fd22
commit 46482e14a4
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
/// <reference path='fourslash.ts'/>
////namespace wwer./**/w
verify.completions({ marker: "", exact: [], isNewIdentifierLocation: true });

View File

@ -104,7 +104,7 @@ namespace ts.Completions {
getJSCompletionEntries(sourceFile, location!.pos, uniqueNames, compilerOptions.target!, entries); // TODO: GH#18217
}
else {
if ((!symbols || symbols.length === 0) && keywordFilters === KeywordCompletionFilters.None) {
if (!isNewIdentifierLocation && (!symbols || symbols.length === 0) && keywordFilters === KeywordCompletionFilters.None) {
return undefined;
}