/** * Unified Result shape used across the handler/parser/dispatch boundary. * * Replaces two divergent conventions that grew up before this: the isError- * keyed discriminator on the legacy validators in `error-response.ts`, and the * local `ParseResult` in `runtime-tools.ts` (`parseBridgeJson`). Both * collapse into `{ ok: true; value: T } | { ok: false; error: E }` so * handlers, parsers, and the dispatch edge can compose without re-implementing * the discriminator in each module. */ export type Result = { ok: true; value: T; } | { ok: false; error: E; }; export declare const ok: (value: T) => Result; export declare const err: (error: E) => Result; export declare const isOk: (r: Result) => r is { ok: true; value: T; }; export declare const isErr: (r: Result) => r is { ok: false; error: E; }; //# sourceMappingURL=result.d.ts.map