//#region src/fp/result.d.ts /** * A Result tuple representing either success `[null, TValue]` or failure `[TError, null]`. * Used throughout the codebase as the standard error-handling mechanism instead of throw. */ type Result = readonly [TError, null] | readonly [null, TValue]; /** * A Promise that resolves to a {@link Result} tuple. */ type ResultAsync = Promise>; /** * Construct a success Result tuple. * * When called with no arguments, returns a void success `[null, undefined]`. * * @param value - The success value (optional). * @returns A Result tuple `[null, value]`. */ declare function ok(): Result; declare function ok(value: TValue): Result; /** * Construct a failure Result tuple. * * Coerces any value to an `Error` via {@link toError} and returns `[Error, null]`. * For domain-specific error types (e.g. `AuthError`, `IconsError`), use raw * tuple literals instead: `[domainError, null] as const`. * * @param error - The error value (coerced to Error). * @returns A Result tuple `[Error, null]`. */ declare function err(error: unknown): Result; //#endregion export { ok as i, ResultAsync as n, err as r, Result as t }; //# sourceMappingURL=result-Dg2-rfn6.d.ts.map