Add optionalReplacementSpan to completions response (#40347)

* Add optionalReplacementRange to completions response

* Get the name right

* Fix unit tests

* Fix comment typo

* Fix comment typo

* Baseline
This commit is contained in:
Andrew Branch
2020-09-04 13:09:52 -07:00
committed by GitHub
parent 8384018e68
commit f6f2d36ee3
13 changed files with 76 additions and 5 deletions

View File

@@ -44,6 +44,7 @@ namespace ts.projectSystem {
isGlobalCompletion: true,
isMemberCompletion: false,
isNewIdentifierLocation: false,
optionalReplacementSpan: { start: { line: 1, offset: 1 }, end: { line: 1, offset: 4 } },
entries: [entry],
});

View File

@@ -80,6 +80,10 @@ namespace ts.projectSystem {
isGlobalCompletion: false,
isMemberCompletion: true,
isNewIdentifierLocation: false,
optionalReplacementSpan: {
start: { line: 1, offset: aTs.content.indexOf("prop;") + 1 },
end: { line: 1, offset: aTs.content.indexOf("prop;") + 1 + "prop".length }
},
entries: expectedCompletionEntries
});
});