diff options
author | Elizabeth Hunt <me@liz.coffee> | 2025-07-26 21:07:36 -0700 |
---|---|---|
committer | Elizabeth Hunt <me@liz.coffee> | 2025-07-27 00:00:12 -0700 |
commit | df76fa3c266f7f9b22d2bfaf98ad5accebcabd35 (patch) | |
tree | 8aaef9f227e385b8e31bd6c69fc6a8231326f361 /u/types/fn | |
parent | 9ee3bf3345b006a745b2ee28fee3613819011796 (diff) | |
download | ci-df76fa3c266f7f9b22d2bfaf98ad5accebcabd35.tar.gz ci-df76fa3c266f7f9b22d2bfaf98ad5accebcabd35.zip |
Fixes type inference for Either.joinRightAsync. Regarding ansible-docker. Will it ever be okay to trust docs?!!
Diffstat (limited to 'u/types/fn')
-rw-r--r-- | u/types/fn/either.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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<E, T> extends Tagged<IEitherTag> { readonly fold: <_T>(leftFolder: Mapper<E, _T>, rightFolder: Mapper<T, _T>) => _T; readonly joinRight: <O, _T>(other: IEither<E, O>, mapper: (a: O, b: T) => _T) => IEither<E, _T>; readonly joinRightAsync: <O, _T>( - other: Supplier<Promise<IEither<E, O>>> | Promise<IEither<E, O>>, - mapper: BiMapper<O, T, _T>, + other: (() => Promise<IEither<E, O>>) | Promise<IEither<E, O>>, + mapper: (a: O, b: T) => _T, ) => Promise<IEither<E, _T>>; } @@ -115,7 +115,7 @@ export class Either<E, T> extends _Tagged implements IEither<E, T> { ) { 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))); }); } |