Skip to content

Commit

Permalink
Merge in watch fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyreilly committed Jan 20, 2018
1 parent 27469c2 commit 92a73e2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.ts
Expand Up @@ -179,14 +179,16 @@ function updateFileInCache(filePath: string, contents: string, instance: TSInsta
instance.files[filePath] = file;
}
else {
fileWatcherEventKind = instance.compiler.FileWatcherEventKind.Created;
if (instance.watchHost) {
fileWatcherEventKind = instance.compiler.FileWatcherEventKind.Created;
}
file = instance.files[filePath] = <TSFile>{ version: 0 };
}
instance.changedFilesList = true;
}

if (contents === undefined) {
fileWatcherEventKind === instance.compiler.FileWatcherEventKind.Deleted;
if (instance.watchHost && contents === undefined) {
fileWatcherEventKind = instance.compiler.FileWatcherEventKind.Deleted;
}

if (file.text !== contents) {
Expand Down

0 comments on commit 92a73e2

Please sign in to comment.