From 82aa518ec01f3a7ec60de5e1b45ecab244eda7c0 Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Tue, 21 Nov 2017 15:21:51 -0800 Subject: [PATCH] Update public API baseline --- .../reference/api/tsserverlibrary.d.ts | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 354f239eeb..32d35138c7 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -4716,7 +4716,7 @@ declare namespace ts.server { interface TypesRegistryRequest { readonly kind: "typesRegistry"; } - interface InstallPackageRequest { + interface InstallPackageRequest extends TypingInstallerRequestWithProjectName { readonly kind: "installPackage"; readonly fileName: Path; readonly packageName: string; @@ -4724,13 +4724,18 @@ declare namespace ts.server { } type ActionSet = "action::set"; type ActionInvalidate = "action::invalidate"; + type ActionPackageInstalled = "action::packageInstalled"; type EventTypesRegistry = "event::typesRegistry"; - type EventPackageInstalled = "event::packageInstalled"; type EventBeginInstallTypes = "event::beginInstallTypes"; type EventEndInstallTypes = "event::endInstallTypes"; type EventInitializationFailed = "event::initializationFailed"; interface TypingInstallerResponse { - readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | EventPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed; + readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed; + } + interface PackageInstalledResponse extends ProjectResponse { + readonly kind: ActionPackageInstalled; + readonly success: boolean; + readonly message: string; } interface InitializationFailedResponse extends TypingInstallerResponse { readonly kind: EventInitializationFailed; @@ -4766,8 +4771,8 @@ declare namespace ts.server { declare namespace ts.server { const ActionSet: ActionSet; const ActionInvalidate: ActionInvalidate; + const ActionPackageInstalled: ActionPackageInstalled; const EventTypesRegistry: EventTypesRegistry; - const EventPackageInstalled: EventPackageInstalled; const EventBeginInstallTypes: EventBeginInstallTypes; const EventEndInstallTypes: EventEndInstallTypes; const EventInitializationFailed: EventInitializationFailed; @@ -7125,12 +7130,13 @@ declare namespace ts.server { } } declare namespace ts.server { - interface InstallPackageOptionsWithProjectRootPath extends InstallPackageOptions { + interface InstallPackageOptionsWithProject extends InstallPackageOptions { + projectName: string; projectRootPath: Path; } interface ITypingsInstaller { isKnownTypesPackageName(name: string): boolean; - installPackage(options: InstallPackageOptionsWithProjectRootPath): Promise; + installPackage(options: InstallPackageOptionsWithProject): Promise; enqueueInstallTypingsRequest(p: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray): void; attach(projectService: ProjectService): void; onProjectClosed(p: Project): void; @@ -7142,7 +7148,7 @@ declare namespace ts.server { private readonly perProjectCache; constructor(installer: ITypingsInstaller); isKnownTypesPackageName(name: string): boolean; - installPackage(options: InstallPackageOptionsWithProjectRootPath): Promise; + installPackage(options: InstallPackageOptionsWithProject): Promise; getTypingsForProject(project: Project, unresolvedImports: SortedReadonlyArray, forceRefresh: boolean): SortedReadonlyArray; updateTypingsForProject(projectName: string, compilerOptions: CompilerOptions, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray, newTypings: string[]): void; deleteTypingsForProject(projectName: string): void; @@ -7566,7 +7572,7 @@ declare namespace ts.server { private createWatcherLog(watchType, project); toPath(fileName: string): Path; private loadTypesMap(); - updateTypingsForProject(response: SetTypings | InvalidateCachedTypings): void; + updateTypingsForProject(response: SetTypings | InvalidateCachedTypings | PackageInstalledResponse): void; private delayInferredProjectsRefresh(); private delayUpdateProjectGraph(project); private sendProjectsUpdatedInBackgroundEvent();