builder.io 1.6.8 → 1.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ import * as ts from "typescript";
2
+ /**
3
+ * Performs an incremental type-check (no emit) for the given project directory.
4
+ * It reads tsconfig.json (just like the tsc CLI does) and enforces the `noEmit` flag.
5
+ *
6
+ * @param projectDir - The path to the project (where tsconfig.json is located).
7
+ * @param oldProgram - Optionally, the previous builder program for incremental builds.
8
+ * @returns An object containing the new builder program and collected diagnostics.
9
+ */
10
+ export interface CheckpointData {
11
+ program: ts.EmitAndSemanticDiagnosticsBuilderProgram;
12
+ diagnostics: ts.Diagnostic[];
13
+ }
14
+ export type Checkpoint = CheckpointData | null;
15
+ export declare function runCheckpoint(projectDir: string, oldProgram?: ts.EmitAndSemanticDiagnosticsBuilderProgram): Checkpoint;
16
+ export declare function filterDiagnostic(c: ts.Diagnostic): boolean;
17
+ /**
18
+ * Given a new list of diagnostics and a baseline list, filter out diagnostics
19
+ * that were already present in the baseline.
20
+ */
21
+ export declare function filterBaselineDiagnostics(baselineFingerprints: Set<string>, checkpoint: Checkpoint): ts.Diagnostic[];
22
+ export declare function createFingerprintSet(checkpoint: Checkpoint): Set<string>;
23
+ /**
24
+ * Pretty prints diagnostics as a plain text string.
25
+ *
26
+ * @param diagnostics - An array of ts.Diagnostic objects.
27
+ * @returns A formatted string that describes the diagnostics.
28
+ */
29
+ export declare function prettyPrintDiagnostics(diagnostics: ts.Diagnostic[]): string;
30
+ export declare function prettyPrintDiagnosticsWithContext(diagnostics: ts.Diagnostic[]): string;