Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 212 additions & 31 deletions packages/typescript/src/api/async/api.ts

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions packages/typescript/src/api/proto.generated.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Code generated by gen-proto; DO NOT EDIT.

import { FileEmitKind } from "#enums/fileEmitKind";
import { JsxEmit } from "#enums/jsxEmit";
import { ModuleDetectionKind } from "#enums/moduleDetectionKind";
import { ModuleKind } from "#enums/moduleKind";
Expand All @@ -9,6 +10,7 @@ import { ScriptKind } from "#enums/scriptKind";
import { ScriptTarget } from "#enums/scriptTarget";
import type { Path } from "../ast/index.ts";

export { FileEmitKind } from "#enums/fileEmitKind";
export { JsxEmit } from "#enums/jsxEmit";
export { ModuleDetectionKind } from "#enums/moduleDetectionKind";
export { ModuleKind } from "#enums/moduleKind";
Expand Down Expand Up @@ -170,6 +172,7 @@ export interface APIMethodInfo {
printNode: APIMethod<PrintNodeParams, string>;
formatNodeForInsertion: APIMethod<FormatNodeForInsertionParams, string>;
emit: APIMethod<EmitParams, EmitResponse>;
getBuildInfoEmit: APIMethod<GetProjectDiagnosticsParams, string>;
emitToString: APIMethod<EmitParams, EmitOutputResponse>;
getJavaScriptEmit: APIMethod<SelectedFilesEmitParams, EmitOutputResponse>;
getDeclarationEmit: APIMethod<SelectedFilesEmitParams, EmitOutputResponse>;
Expand Down Expand Up @@ -409,6 +412,8 @@ export interface ProjectResponse {
configFileName: string;
currentDirectory: string;
dirty: boolean;
incremental: boolean;
incrementalStatus?: IncrementalStatusResponse | undefined;
parsedCommandLine: ConfigFileResponse;
/** @deprecated Use parsedCommandLine.fileNames. */
rootFiles: string[];
Expand Down Expand Up @@ -1112,6 +1117,7 @@ export interface BatchRequest {
| "getBigIntType"
| "getBindDiagnostics"
| "getBooleanType"
| "getBuildInfoEmit"
| "getCheckTypeOfType"
| "getCompletionsAtPosition"
| "getConfigFileNames"
Expand Down Expand Up @@ -1287,6 +1293,7 @@ export interface BatchResponse {
| "getBigIntType"
| "getBindDiagnostics"
| "getBooleanType"
| "getBuildInfoEmit"
| "getCheckTypeOfType"
| "getCompletionsAtPosition"
| "getConfigFileNames"
Expand Down Expand Up @@ -1470,6 +1477,8 @@ export interface SnapshotRequestChangesParams {
* or all contained projects when true.
*/
ensurePrograms?: EnsurePrograms | undefined;
/** IncrementalOperations advances incremental program state while constructing the snapshot. */
incrementalOperations?: readonly IncrementalOperationParams[] | undefined;
}

/**
Expand Down Expand Up @@ -1528,6 +1537,7 @@ export interface SnapshotChanges {
export interface SnapshotOperationResponse {
createdPrograms?: SyntheticProjectId[] | undefined;
openedFiles?: OpenedFileOperationResult[] | undefined;
incrementalOperations?: IncrementalOperationResultResponse[] | undefined;
}

/**
Expand Down Expand Up @@ -1692,6 +1702,14 @@ export interface TranspileOptions {
reportDiagnostics?: boolean | undefined;
}

export interface IncrementalStatusResponse {
changedFiles: string[];
pendingEmit: IncrementalPendingEmitResponse[];
pendingSemanticDiagnostics: string[];
buildInfoEmitPending: boolean;
latestChangedDtsFile?: string | undefined;
}

export interface PackageId {
name: string;
subModuleName: string;
Expand Down Expand Up @@ -1737,6 +1755,8 @@ export interface CreateSnapshotProgramParams {
rootFiles: readonly DocumentIdentifier[] | null;
compilerOptions: CompilerOptions;
options?: CreateProgramOptions | undefined;
/** Incremental restores persistent diagnostic and emit state from the configured build info file. */
incremental?: boolean | undefined;
}

export interface ReconfigureSnapshotProgramParams {
Expand All @@ -1746,6 +1766,12 @@ export interface ReconfigureSnapshotProgramParams {
options?: CreateProgramOptions | undefined;
}

export interface IncrementalOperationParams {
program: SyntheticProjectId;
kind: "emit" | "emitBuildInfo";
emitOnly?: number | undefined;
}

/**
* RequestDirectoryEntries is a cached directory listing. Entry names are
* relative to the directory, matching vfs.GetAccessibleEntries.
Expand Down Expand Up @@ -1781,6 +1807,11 @@ export interface OpenedFileOperationResult {
project: ProjectId;
}

export interface IncrementalOperationResultResponse {
program: ProjectId;
result: EmitResponse;
}

export interface PluginImport {
name: string;
}
Expand All @@ -1792,6 +1823,11 @@ export interface ModuleResolutionEntry {
result: StaticModuleResolution;
}

export interface IncrementalPendingEmitResponse {
sourceFileName: string;
kind: FileEmitKind;
}

/** CompletionEntryLabelDetailsResponse holds additional label display text for a completion entry. */
export interface CompletionEntryLabelDetailsResponse {
detail?: string | undefined;
Expand Down
Loading
Loading