ttsc
Version:
General-purpose TypeScript-Go compiler, runtime, plugin host, and LSP host.
20 lines (19 loc) • 864 B
TypeScript
import type { ITtscCompilerContext } from "../../structures/ITtscCompilerContext";
import type { TtscBuildResult } from "../../structures/internal/TtscBuildResult";
/**
* Compile a project and capture emitted files without writing to the project
* tree.
*
* When no plugins are configured the fast path spawns the native ttsc compiler
* host (`cmd/ttsc api-compile`) which returns a structured JSON response
* containing diagnostics and an output file map. When plugins are present the
* slow path goes through `runBuild` into a temp directory and reads the files
* back from disk.
*
* @returns A map of output path → file content plus a `TtscBuildResult` with
* diagnostics and the exit status.
*/
export declare function compileProjectInMemory(options: ITtscCompilerContext): {
output: Record<string, string>;
result: TtscBuildResult;
};