Update language service call for 4.3 protocol

This commit is contained in:
Andrew Branch 2021-04-01 10:21:34 -07:00
parent f3f8d3d870
commit 8426ff6475
No known key found for this signature in database
GPG key ID: 22CCA4B120C427D2

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);