/** * @file result.ts * @brief Immutable success and failure records for fallible engine calls. */ /** @brief Success or failure returned by fallible engine calls. */ export type Result = Ok | Err; /** @brief A successful result. */ export interface Ok { readonly ok: true; readonly value: T; } /** @brief A failed result with a description of the first problem found. */ export interface Err { readonly ok: false; readonly error: string; } /** @brief Freeze a success record without copying or freezing its value. */ export declare function ok(value: T): Ok; /** @brief Freeze a failure record containing the supplied diagnostic. */ export declare function err(error: string): Err;