From df76fa3c266f7f9b22d2bfaf98ad5accebcabd35 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 26 Jul 2025 21:07:36 -0700 Subject: Fixes type inference for Either.joinRightAsync. Regarding ansible-docker. Will it ever be okay to trust docs?!! --- u/types/fn/either.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'u/types/fn') diff --git a/u/types/fn/either.ts b/u/types/fn/either.ts index 5e2dca0..0f65859 100644 --- a/u/types/fn/either.ts +++ b/u/types/fn/either.ts @@ -28,8 +28,8 @@ export interface IEither extends Tagged { readonly fold: <_T>(leftFolder: Mapper, rightFolder: Mapper) => _T; readonly joinRight: (other: IEither, mapper: (a: O, b: T) => _T) => IEither; readonly joinRightAsync: ( - other: Supplier>> | Promise>, - mapper: BiMapper, + other: (() => Promise>) | Promise>, + mapper: (a: O, b: T) => _T, ) => Promise>; } @@ -115,7 +115,7 @@ export class Either extends _Tagged implements IEither { ) { return this.flatMapAsync(async (t) => { const o = typeof other === 'function' ? other() : other; - return o.then((other) => other.mapRight((o) => mapper(o, t))); + return await o.then((other) => other.mapRight((o) => mapper(o, t))); }); } -- cgit v1.2.3-70-g09d2