import { Ok } from "./class/Ok.class.ts"; import { Err } from "./class/Err.class.ts"; export { Option, Some } from "./class/Some.class.ts"; export { None } from "./class/None.class.ts"; export { Ok, Err }; export type { Result } from "./types.ts"; import type { Result, CombineResults, CombineResultsWithAllErrors } from "./types.ts"; /** * Wrap an operation that may throw an Error (`try-catch` style) into checked exception style * @param op The operation function */ export declare function wrap(op: () => T): Result; /** * Wrap an async operation that may throw an Error (`try-catch` style) into checked exception style * @param op The operation function */ export declare function wrapAsync(op: () => Promise): Promise>; export declare function isResult(val: unknown): val is Result; /** * Combine a tuple/array of Results into a single Result. * Short-circuits on the first encountered Err. */ export declare function combine[]>(results: T): CombineResults; /** * Combine a tuple/array of Results into a single Result, collecting every Err * instead of short-circuiting on the first one. */ export declare function combineWithAllErrors[]>(results: T): CombineResultsWithAllErrors; //# sourceMappingURL=index.d.ts.map