import type { StructuredError, AnalysisDiagnostic } from "./errors/structured-errors.js"; import { type TypedModuleInfo } from "./checker/check.js"; import type { EdictModule } from "./ast/nodes.js"; export type CheckBrowserResult = CheckBrowserSuccess | CheckBrowserFailure; export interface CheckBrowserSuccess { ok: true; errors: []; /** The validated module AST */ module: EdictModule; /** Side-table of inferred types */ typeInfo: TypedModuleInfo; /** INFO-level diagnostics */ diagnostics: AnalysisDiagnostic[]; } export interface CheckBrowserFailure { ok: false; errors: StructuredError[]; /** Null on failure — use discriminant `ok` to narrow */ module: null; /** Present for late-stage failures (complexity/effects) where type-checking succeeded; null for earlier phases */ typeInfo: TypedModuleInfo | null; /** INFO-level diagnostics (may still be present on failure) */ diagnostics: AnalysisDiagnostic[]; } /** * Browser-safe pipeline: validate → resolve → typeCheck → complexityCheck → effectCheck. * * Identical to `check()` but skips contract verification (phase 4), which * requires Node.js worker threads and Z3. This function is synchronous — * no async needed since Z3 is excluded. * * @param ast - Any JSON value to run through phases 1–3 * @returns Discriminated union: `ok: true` with module/typeInfo, or `ok: false` with null module/typeInfo */ export declare function checkBrowser(ast: unknown): CheckBrowserResult; //# sourceMappingURL=check-browser.d.ts.map