Skip to content

Commit

Permalink
chore: remove outdated completion cache logic
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Sep 23, 2021
1 parent c75f098 commit 15e744f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/shared/src/ts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,9 @@ export function getTsCompletions(ts: typeof import('typescript/lib/tsserverlibra

export function createTsLanguageService(
ts: typeof import('typescript/lib/tsserverlibrary'),
_host: ts.LanguageServiceHost,
host: ts.LanguageServiceHost,
) {
// @ts-ignore
const importSuggestionsCache = ts.Completions?.createImportSuggestionsForFileCache?.();
const host = {
..._host,
// @ts-ignore
// TODO: crash on 'addListener' from 'node:process', reuse because TS has same problem
getImportSuggestionsCache: () => importSuggestionsCache,
};
// TODO: new cache logic https://github.com/microsoft/TypeScript/blob/4c0a51e14b67460b47bdcebea6b70270a83a243e/src/server/project.ts#L258
return ts.createLanguageService(host);
}

Expand Down

0 comments on commit 15e744f

Please sign in to comment.