Skip to content

Commit 46482e1

Browse files
committed
Verify that completion with new identifier location returns isNewIdentifierLocation: true
Fixes #24009 Signed-off-by: Sheetal Nandi <[email protected]>
1 parent ad85e4f commit 46482e1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

completionAtDottedNamespace.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
////namespace wwer./**/w
4+
5+
verify.completions({ marker: "", exact: [], isNewIdentifierLocation: true });

src/services/completions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace ts.Completions {
104104
getJSCompletionEntries(sourceFile, location!.pos, uniqueNames, compilerOptions.target!, entries); // TODO: GH#18217
105105
}
106106
else {
107-
if ((!symbols || symbols.length === 0) && keywordFilters === KeywordCompletionFilters.None) {
107+
if (!isNewIdentifierLocation && (!symbols || symbols.length === 0) && keywordFilters === KeywordCompletionFilters.None) {
108108
return undefined;
109109
}
110110

0 commit comments

Comments
 (0)