import type { AppFailure } from "./errors.ts"; /** * The single success/failure carrier used across application input boundaries. * Adapters map technology-specific errors to an application failure before * constructing this value. * * It lives in `src/contracts` because it is shared vocabulary rather than * application behaviour: contracts modules describe results too, and reaching * up into `src/application` for the shape made the dependency between the two * packages point both ways. `src/application/result.ts` re-exports it. */ export type Result = | Readonly<{ ok: true; value: Value }> | Readonly<{ ok: false; error: Failure }>;