Lint errors fix

This commit is contained in:
Sheetal Nandi 2017-11-07 11:35:38 -08:00
parent 576fe1e995
commit 7ebf9d9f9d
2 changed files with 9 additions and 3 deletions

View File

@ -166,12 +166,16 @@ namespace ts {
semanticDiagnosticsPerFile.delete(sourceFile.path);
}
newReferences && referencedMap.set(sourceFile.path, newReferences);
if (newReferences) {
referencedMap.set(sourceFile.path, newReferences);
}
fileInfos.set(sourceFile.path, { version, signature: oldInfo && oldInfo.signature });
}
// For removed files, remove the semantic diagnostics removed files as changed
useOldState && oldState.fileInfos.forEach((_value, path) => !fileInfos.has(path) && semanticDiagnosticsPerFile.delete(path));
if (useOldState) {
oldState.fileInfos.forEach((_value, path) => !fileInfos.has(path) && semanticDiagnosticsPerFile.delete(path));
}
// Set the old state and program to undefined to ensure we arent keeping them alive hence forward
oldState = undefined;

View File

@ -53,7 +53,9 @@ namespace ts {
const program = getProgram();
builderState = createBuilderState(program, builderOptions, builderState);
const outputFileNames: string[] = [];
while (builderState.emitNextAffectedFile(program, fileName => outputFileNames.push(fileName))) { }
// tslint:disable-next-line no-empty
while (builderState.emitNextAffectedFile(program, fileName => outputFileNames.push(fileName))) {
}
assert.deepEqual(outputFileNames, fileNames);
};
}