Skip to content

race

race<E, A>(invocations): Deferred<Outcome<E, A>>

Defined in: Core/Op.ts:721

Resolves to the outcome of whichever invocation settles first. An alternative to Promise.race that stays within the Op type system.

E

A

readonly Deferred<Outcome<E, A>>[]

Deferred<Outcome<E, A>>

const winner = await Op.race([manager.run(inputA), manager.run(inputB)]);