mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-17 01:55:50 -06:00
Make the versions in the source file non zero when the source file is created
This commit is contained in:
parent
c9a17f325b
commit
6d36a3d778
@ -468,9 +468,9 @@ namespace ts {
|
||||
else {
|
||||
let fileWatcher: FileWatcher;
|
||||
if (sourceFile) {
|
||||
sourceFile.version = "0";
|
||||
sourceFile.version = "1";
|
||||
fileWatcher = watchFilePath(system, fileName, onSourceFileChange, path, writeLog);
|
||||
sourceFilesCache.set(path, { sourceFile, version: 0, fileWatcher });
|
||||
sourceFilesCache.set(path, { sourceFile, version: 1, fileWatcher });
|
||||
}
|
||||
else {
|
||||
sourceFilesCache.set(path, "0");
|
||||
@ -612,7 +612,7 @@ namespace ts {
|
||||
resolutionCache.invalidateResolutionOfFile(path);
|
||||
if (!isString(hostSourceFile)) {
|
||||
hostSourceFile.fileWatcher.close();
|
||||
sourceFilesCache.set(path, (hostSourceFile.version++).toString());
|
||||
sourceFilesCache.set(path, (++hostSourceFile.version).toString());
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user