From 5db16d122914336124620a5152655917e58f05a6 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 12 Jul 2022 09:35:18 +1000 Subject: fix(lsp): enable auto imports (#15145) Fixes: #15111 --- cli/tsc/99_main_compiler.js | 5 ++--- cli/tsc/compiler.d.ts | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'cli/tsc') diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index c2b50ba16..85ab38ccc 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -718,10 +718,9 @@ delete Object.prototype.__proto__; request.args.specifier, request.args.position, request.args.name, - undefined, + {}, request.args.source, - undefined, - // @ts-expect-error this exists in 4.3 but not part of the d.ts + request.args.preferences, request.args.data, ), ); diff --git a/cli/tsc/compiler.d.ts b/cli/tsc/compiler.d.ts index 1ba116170..bf0660470 100644 --- a/cli/tsc/compiler.d.ts +++ b/cli/tsc/compiler.d.ts @@ -50,6 +50,7 @@ declare global { } type LanguageServerRequest = + | Restart | ConfigureRequest | FindRenameLocationsRequest | GetAssets @@ -138,7 +139,8 @@ declare global { position: number; name: string; source?: string; - data?: unknown; + preferences?: ts.UserPreferences; + data?: ts.CompletionEntryData; }; } @@ -252,7 +254,7 @@ declare global { position: number; } - interface Restart { + interface Restart extends BaseLanguageServerRequest { method: "restart"; } } -- cgit v1.2.3