Skip to content

Commit efef7b3

Browse files
author
zhengbli
committed
Update updateErrorCheck function
1 parent 83f57d2 commit efef7b3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/server/session.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ namespace ts.server {
235235
}
236236

237237
updateErrorCheck(checkList: PendingErrorCheck[], seq: number,
238-
matchSeq: (seq: number) => boolean, ms = 1500, followMs = 200) {
238+
matchSeq: (seq: number) => boolean, ms = 1500, followMs = 200, requireOpen = true) {
239239
if (followMs > ms) {
240240
followMs = ms;
241241
}
@@ -250,7 +250,7 @@ namespace ts.server {
250250
var checkOne = () => {
251251
if (matchSeq(seq)) {
252252
var checkSpec = checkList[index++];
253-
if (checkSpec.project.getSourceFileFromName(checkSpec.fileName, true)) {
253+
if (checkSpec.project.getSourceFileFromName(checkSpec.fileName, requireOpen)) {
254254
this.syntacticCheck(checkSpec.fileName, checkSpec.project);
255255
this.immediateId = setImmediate(() => {
256256
this.semanticCheck(checkSpec.fileName, checkSpec.project);
@@ -872,7 +872,7 @@ namespace ts.server {
872872
let normalizedFileName = ts.normalizePath(fileName);
873873
return { fileName: normalizedFileName, project };
874874
});
875-
this.updateErrorCheck(checkList, this.changeSeq, (n) => n == this.changeSeq, delay);
875+
this.updateErrorCheck(checkList, this.changeSeq, (n) => n == this.changeSeq, delay, 200, false);
876876
}
877877
}
878878

0 commit comments

Comments
 (0)