import type { OkImpl } from "./class/Ok.class.ts"; import type { ErrImpl } from "./class/Err.class.ts"; export type Result = OkImpl | ErrImpl; export type InferOkTypes = R extends Result ? T : never; export type InferErrTypes = R extends Result ? E : never; /** * Result of Result.combine(): preserves each input Result's Ok type at its tuple position, * unions all the possible Err types. */ export type CombineResults[]> = Result<{ [K in keyof T]: InferOkTypes; }, InferErrTypes>; /** * Result of Result.combineWithAllErrors(): same as CombineResults, but the Err side * is an array collecting every encountered error instead of a single union. */ export type CombineResultsWithAllErrors[]> = Result<{ [K in keyof T]: InferOkTypes; }, InferErrTypes[]>; //# sourceMappingURL=types.d.ts.map