import { VirtualTypeScriptEnvironment } from "@typescript/vfs";
export declare type FileMap = Record<string, string>;
/**
 * A representation of a Typescript project. Only supports single-file projects currently.
 */
export declare class TypescriptProject {
    private fs;
    /**
     * Since this module is lazily initialized, this serves as a way to throttle multiple consecutive `init` requests.
     * We want to avoid initializing `tsserver` multiple times.
     *
     * After construction, it stays in the `procrastinating` state until someone requests something of it.
     * Once that happens, it goes through the `initializing` & `ready` states.
     */
    private state;
    /** When initialization starts, the promise it returns is stored here so that future `init` requests can be throttled */
    private initPromise?;
    private tsserver?;
    constructor(entrypointFileContent: string);
    get entrypoint(): string;
    private init;
    injectTypes(types: FileMap): void;
    env(): Promise<VirtualTypeScriptEnvironment>;
    lang(): Promise<VirtualTypeScriptEnvironment["languageService"]>;
    destroy(): void;
}
