Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/server/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,10 @@ namespace ts.server {
}

// No need to analyze lib.d.ts
let fileNamesInProject = fileNames.filter(value => value.indexOf("lib.d.ts") < 0);
const fileNamesInProject = fileNames.filter(value => value.indexOf("lib.d.ts") < 0);
if (fileNamesInProject.length === 0) {
return;
}

// Sort the file name list to make the recently touched files come first
const highPriorityFiles: NormalizedPath[] = [];
Expand All @@ -1625,7 +1628,7 @@ namespace ts.server {
else {
const info = this.projectService.getScriptInfo(fileNameInProject);
if (!info.isScriptOpen()) {
if (fileNameInProject.indexOf(Extension.Dts) > 0) {
if (fileExtensionIs(fileNameInProject, Extension.Dts)) {
veryLowPriorityFiles.push(fileNameInProject);
}
else {
Expand All @@ -1638,14 +1641,11 @@ namespace ts.server {
}
}

fileNamesInProject = highPriorityFiles.concat(mediumPriorityFiles).concat(lowPriorityFiles).concat(veryLowPriorityFiles);

if (fileNamesInProject.length > 0) {
const checkList = fileNamesInProject.map(fileName => ({ fileName, project }));
// Project level error analysis runs on background files too, therefore
// doesn't require the file to be opened
this.updateErrorCheck(next, checkList, delay, /*requireOpen*/ false);
}
const sortedFiles = [...highPriorityFiles, ...mediumPriorityFiles, ...lowPriorityFiles, ...veryLowPriorityFiles];
const checkList = sortedFiles.map(fileName => ({ fileName, project }));
// Project level error analysis runs on background files too, therefore
// doesn't require the file to be opened
this.updateErrorCheck(next, checkList, delay, /*requireOpen*/ false);
}

getCanonicalFileName(fileName: string) {
Expand Down