Update updateErrorCheck function

This commit is contained in:
zhengbli 2015-07-16 15:45:31 -07:00
parent 83f57d26f8
commit efef7b30c1

View File

@ -235,7 +235,7 @@ namespace ts.server {
}
updateErrorCheck(checkList: PendingErrorCheck[], seq: number,
matchSeq: (seq: number) => boolean, ms = 1500, followMs = 200) {
matchSeq: (seq: number) => boolean, ms = 1500, followMs = 200, requireOpen = true) {
if (followMs > ms) {
followMs = ms;
}
@ -250,7 +250,7 @@ namespace ts.server {
var checkOne = () => {
if (matchSeq(seq)) {
var checkSpec = checkList[index++];
if (checkSpec.project.getSourceFileFromName(checkSpec.fileName, true)) {
if (checkSpec.project.getSourceFileFromName(checkSpec.fileName, requireOpen)) {
this.syntacticCheck(checkSpec.fileName, checkSpec.project);
this.immediateId = setImmediate(() => {
this.semanticCheck(checkSpec.fileName, checkSpec.project);
@ -872,7 +872,7 @@ namespace ts.server {
let normalizedFileName = ts.normalizePath(fileName);
return { fileName: normalizedFileName, project };
});
this.updateErrorCheck(checkList, this.changeSeq, (n) => n == this.changeSeq, delay);
this.updateErrorCheck(checkList, this.changeSeq, (n) => n == this.changeSeq, delay, 200, false);
}
}