Pass 'data' to completion details request (#117092)

This commit is contained in:
Andrew Branch 2021-03-01 16:04:48 -08:00 committed by GitHub
parent 5d6ea08985
commit 400737c5b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,7 +177,13 @@ class MyCompletionItem extends vscode.CompletionItem {
const args: Proto.CompletionDetailsRequestArgs = {
...typeConverters.Position.toFileLocationRequestArgs(filepath, this.position),
entryNames: [
this.tsEntry.source ? { name: this.tsEntry.name, source: this.tsEntry.source } : this.tsEntry.name
// @ts-expect-error until TypeScript 4.3 protocol update
this.tsEntry.source || this.tsEntry.data ? {
name: this.tsEntry.name,
source: this.tsEntry.source,
// @ts-expect-error until TypeScript 4.3 protocol update
data: this.tsEntry.data,
} : this.tsEntry.name
]
};
const response = await client.interruptGetErr(() => client.execute('completionEntryDetails', args, requestToken.token));