(changedPaths map[string]fswatch.EventKind)
| 354 | } |
| 355 | |
| 356 | func (w *Watcher) evictChangedSourceFiles(changedPaths map[string]fswatch.EventKind) { |
| 357 | caseSensitive := w.sys.FS().UseCaseSensitiveFileNames() |
| 358 | cwd := w.sys.GetCurrentDirectory() |
| 359 | for eventPath := range changedPaths { |
| 360 | p := tspath.ToPath(eventPath, cwd, caseSensitive) |
| 361 | if _, ok := w.sourceFileCache.Load(p); ok { |
| 362 | if w.wm.DebugLog != nil { |
| 363 | fmt.Fprintf(w.wm.DebugLog, "[watch] evicting cached source file: %s\n", p) |
| 364 | } |
| 365 | w.sourceFileCache.Delete(p) |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | func (w *Watcher) compileAndEmit() tsc.CompileAndEmitResult { |
| 371 | return tsc.EmitFilesAndReportErrors(tsc.EmitInput{ |
no test coverage detected