import { Logger } from "../../../harness/tsserverLogger";
import * as ts from "../../_namespaces/ts";
import { File, TestServerHost } from "./virtualFileSystemWithWatch";
export declare const customTypesMap: {
    path: ts.Path;
    content: string;
};
export interface PostExecAction {
    readonly success: boolean;
    requestId: number;
    readonly packageNames: readonly string[];
    readonly callback: ts.server.typingsInstaller.RequestCompletedAction;
}
export declare function loggerToTypingsInstallerLog(logger: Logger): ts.server.typingsInstaller.Log | undefined;
export interface FileWithPackageName extends File {
    package: string;
}
export type InstallActionThrowingError = string;
export type InstallActionWithTypingFiles = [installedTypings: string[] | string, typingFiles: File[]];
export type InstallActionWithFilteredTypings = [typingFiles: FileWithPackageName[]];
export type InstallAction = InstallActionThrowingError | InstallActionWithTypingFiles | InstallActionWithFilteredTypings;
export declare class TestTypingsInstallerWorker extends ts.server.typingsInstaller.TypingsInstaller {
    readonly globalTypingsCacheLocation: string;
    private installAction;
    readonly typesRegistry: Map<string, ts.MapLike<string>>;
    protected projectService: ts.server.ProjectService;
    constructor(globalTypingsCacheLocation: string, throttleLimit: number, installTypingHost: TestServerHost, logger: Logger, typesRegistry: string | readonly string[] | undefined, installAction: InstallAction | undefined);
    protected postExecActions: PostExecAction[];
    executePendingCommands(): void;
    attach(projectService: ts.server.ProjectService): void;
    getInstallTypingHost(): ts.server.InstallTypingHost;
    installWorker(requestId: number, packageNames: string[], _cwd: string, cb: ts.server.typingsInstaller.RequestCompletedAction): void;
    executeInstallWithTypingFiles(requestId: number, packageNames: string[], installedTypings: string[] | string, typingFiles: File[], cb: ts.server.typingsInstaller.RequestCompletedAction): void;
    sendResponse(response: ts.server.SetTypings | ts.server.InvalidateCachedTypings | ts.server.WatchTypingLocations): void;
    enqueueInstallTypingsRequest(project: ts.server.Project, typeAcquisition: ts.TypeAcquisition, unresolvedImports: ts.SortedReadonlyArray<string>): void;
    addPostExecAction(stdout: string | string[], requestId: number, packageNames: string[], cb: ts.server.typingsInstaller.RequestCompletedAction): void;
}
export interface TestTypingsInstallerOptions {
    globalTypingsCacheLocation?: string;
    throttleLimit?: number;
    installAction?: InstallAction;
    typesRegistry?: string | readonly string[];
}
export declare class TestTypingsInstaller implements ts.server.ITypingsInstaller {
    private installTypingHost;
    private logger;
    protected projectService: ts.server.ProjectService;
    installer: TestTypingsInstallerWorker;
    readonly globalTypingsCacheLocation: string;
    private readonly throttleLimit;
    private installAction?;
    private typesRegistry?;
    constructor(installTypingHost: TestServerHost, logger: Logger, options?: TestTypingsInstallerOptions);
    isKnownTypesPackageName: typeof ts.notImplemented;
    installPackage: typeof ts.notImplemented;
    attach(projectService: ts.server.ProjectService): void;
    onProjectClosed(p: ts.server.Project): void;
    enqueueInstallTypingsRequest(project: ts.server.Project, typeAcquisition: ts.TypeAcquisition, unresolvedImports: ts.SortedReadonlyArray<string>): void;
}
export declare function createTypesRegistry(...list: string[]): Map<string, ts.MapLike<string>>;
//# sourceMappingURL=typingsInstaller.d.ts.map