()
| 382 | } |
| 383 | |
| 384 | func (w *Watcher) recheckTsConfig() bool { |
| 385 | if w.configFileName == "" { |
| 386 | return false |
| 387 | } |
| 388 | |
| 389 | if !w.configHasErrors && len(w.configFilePaths) > 0 { |
| 390 | changed := false |
| 391 | for _, path := range w.configFilePaths { |
| 392 | oldMtime, ok := w.configMtimes[path] |
| 393 | s := w.sys.FS().Stat(path) |
| 394 | if !ok { |
| 395 | if s != nil { |
| 396 | changed = true |
| 397 | break |
| 398 | } |
| 399 | } else if s == nil || !s.ModTime().Equal(oldMtime) { |
| 400 | changed = true |
| 401 | break |
| 402 | } |
| 403 | } |
| 404 | if !changed { |
| 405 | return false |
| 406 | } |
| 407 | } |
| 408 | |
| 409 | configParseResult := w.parseConfigFile() |
| 410 | if configParseResult == nil { |
| 411 | return true |
| 412 | } |
| 413 | if w.configHasErrors { |
| 414 | w.configModified = true |
| 415 | } |
| 416 | w.configHasErrors = false |
| 417 | w.configFilePaths = append([]string{w.configFileName}, configParseResult.ExtendedSourceFiles()...) |
| 418 | if !reflect.DeepEqual(w.config.ParsedConfig, configParseResult.ParsedConfig) { |
| 419 | w.configModified = true |
| 420 | } |
| 421 | w.config = configParseResult |
| 422 | return false |
| 423 | } |
| 424 | |
| 425 | func (w *Watcher) parseConfigFile() *tsoptions.ParsedCommandLine { |
| 426 | extendedConfigCache := &tsc.ExtendedConfigCache{} |
no test coverage detected