Merge pull request #120362 from andrewbranch/ts-4.3-update

[html-language-features] Update TS language service call for 4.3 protocol
This commit is contained in:
Martin Aeschlimann 2021-04-06 15:06:58 +02:00 committed by GitHub
commit ee4b092ef2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,7 +127,8 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocume
async doResolve(document: TextDocument, item: CompletionItem): Promise<CompletionItem> {
const jsDocument = jsDocuments.get(document);
const jsLanguageService = await host.getLanguageService(jsDocument);
let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined);
// @ts-expect-error until 4.3 protocol update
let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined, undefined);
if (details) {
item.detail = ts.displayPartsToString(details.displayParts);
item.documentation = ts.displayPartsToString(details.documentation);