typescript
Version:
TypeScript is a language for application scale JavaScript development
44 lines • 2.42 kB
TypeScript
/**
* Shared utilities for the TypeScript API client.
*/
import type { FileSystemCallbacks } from "./fs.ts";
export interface ClientSocketOptions {
/** Path to the Unix domain socket or Windows named pipe for API communication */
pipe: string;
/** Maximum encoded byte size of each batch response page. Defaults to 300 million bytes. Individual responses can be larger than this size, but this controls where batch pages are cutoff. */
maxResponseBytesPerPage?: number | undefined;
}
export interface ClientSpawnOptions {
/** Path to the tsc executable. Defaults to the bundled tsc binary. */
tsserverPath?: string | undefined;
/** Current working directory */
cwd?: string | undefined;
/** Host filesystem callbacks. */
fs?: FileSystemCallbacks | undefined;
/** Whether file names are case-sensitive. Inferred from the client filesystem when omitted. */
useCaseSensitiveFileNames?: boolean | undefined;
/** Allow trusted projects to execute configured external content mapper processes. */
runExternalCode?: boolean | undefined;
/** Maximum encoded byte size of each batch response page. Defaults to 300 million bytes. Individual responses can be larger than this size, but this controls where batch pages are cutoff. */
maxResponseBytesPerPage?: number | undefined;
/**
* When true, collect timing information for each request. The client
* measures round-trip latency and bytes sent/received, and the server
* measures its own per-request processing time; both are combined (along
* with an estimated transport overhead) in the snapshot returned by
* {@link API.getTimingInfo}.
* Setting `TS_API_TIMING_DIR` to a nonempty output directory also enables
* collection, even when this option is false, and writes a JSON snapshot
* when the API is closed.
*/
collectTiming?: boolean | undefined;
}
export type ClientOptions = ClientSocketOptions | ClientSpawnOptions;
export declare function isSpawnOptions(options: ClientOptions): options is ClientSpawnOptions;
export declare function resolveExePath(options: ClientSpawnOptions): string;
export declare function getAPIProcessArgs(options: ClientSpawnOptions, async: boolean): string[];
export interface LSPConnectionOptions extends ClientSocketOptions {
}
export interface APIOptions extends ClientSpawnOptions {
}
//# sourceMappingURL=options.d.ts.map