Skip to content

Commit

Permalink
slight optimization. no cache to clear for the first run
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlyu123 committed Jan 11, 2024
1 parent 9b012d3 commit 4620a28
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/language-server/src/plugins/typescript/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,13 @@ async function createLanguageService(

dirty = false;

if (!oldProgram) {
changedFilesForExportCache.clear();
return;
}

for (const fileName of changedFilesForExportCache) {
const oldFile = oldProgram?.getSourceFile(fileName);
const oldFile = oldProgram.getSourceFile(fileName);
const newFile = program?.getSourceFile(fileName);

// file for another tsconfig
Expand Down

0 comments on commit 4620a28

Please sign in to comment.