/** * Right */ export declare type Right = { readonly _tag: 'Right'; readonly right: T; }; /** * Left */ export declare type Left = { readonly _tag: 'Left'; readonly errorObject: Error; readonly left: E; }; /** * Either * TODO: Result */ export declare type Either = Left | Right; /** * * @param right * @returns */ export declare function Right(right: T): Right; /** * * @param left * @returns */ export declare function Left(left: F): Left; /** * * @param either * @returns */ export declare function isRight(either: Either): either is Right; /** * * @param either * @returns */ export declare function isLeft(either: Either): either is Left; /** * * @param either * @param mapper * @returns */ export declare function eitherMapRight(either: Either, mapper: (right: T) => Either): Either; /** * TODO: eitherMatch * @param either * @param mapper * @returns */ export declare function eitherFold(either: Either, onLeft: (left: E) => TResult, onRight: (right: T) => TResult): TResult; /** * * @param arr * @returns */ export declare function eitherArray(arr: readonly Either[]): Either; /** * * @param arr * @param filter * @returns */ export declare function eitherArrayFilter(arr: readonly T[], filter: (t: T) => Either): Either; /** * * @param arr * @param mapper * @returns */ export declare function eitherArrayMap(arr: readonly T[], mapper: (t: T) => Either): Either; /** * * @param arr * @param reducer * @param initialValue * @returns */ export declare function eitherArrayReduce(arr: readonly T[], initialValue: Either, reducer: (acc: TResult, el: T) => Either): Either; //# sourceMappingURL=either.d.ts.map