Instead of watching files in typing installer, forward it to projectService (#54028)

This commit is contained in:
Sheetal Nandi
2023-04-26 13:31:36 -07:00
committed by GitHub
parent f22898d577
commit a956bbc831
86 changed files with 1098 additions and 1040 deletions

View File

@@ -36,6 +36,7 @@ import {
ActionInvalidate,
ActionPackageInstalled,
ActionSet,
ActionWatchTypingLocations,
Arguments,
BeginInstallTypes,
createInstallTypingsRequest,
@@ -669,7 +670,7 @@ function startNodeSession(options: StartSessionOptions, logger: Logger, cancella
}
}
private handleMessage(response: TypesRegistryResponse | PackageInstalledResponse | SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes | InitializationFailedResponse) {
private handleMessage(response: TypesRegistryResponse | PackageInstalledResponse | SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes | InitializationFailedResponse | server.WatchTypingLocations) {
if (this.logger.hasLevel(LogLevel.verbose)) {
this.logger.info(`Received response:${stringifyIndented(response)}`);
}
@@ -765,6 +766,9 @@ function startNodeSession(options: StartSessionOptions, logger: Logger, cancella
break;
}
case ActionWatchTypingLocations:
this.projectService.watchTypingLocations(response);
break;
default:
assertType<never>(response);
}