mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
Handle package.json watch in tsc and tsserver. (#49328)
* refactoring * Maintain packagejson paths per resolution so we dont have invalidate everything on package json change * Fix todo
This commit is contained in:
@@ -522,6 +522,18 @@ namespace ts.server {
|
||||
);
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
watchAffectingFileLocation(file: string, cb: FileWatcherCallback) {
|
||||
return this.projectService.watchFactory.watchFile(
|
||||
file,
|
||||
cb,
|
||||
PollingInterval.High,
|
||||
this.projectService.getWatchOptions(this),
|
||||
WatchType.PackageJson,
|
||||
this
|
||||
);
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
clearInvalidateResolutionOfFailedLookupTimer() {
|
||||
return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`);
|
||||
|
||||
Reference in New Issue
Block a user