effect-io-ai

Package: effect
Module: Micro

Micro.race

Returns an effect that races two effects, yielding the value of the first effect to succeed. Losers of the race will be interrupted immediately.

Signature

declare const race: { <A2, E2, R2>(that: Micro<A2, E2, R2>): <A, E, R>(self: Micro<A, E, R>) => Micro<A | A2, E | E2, R | R2>; <A, E, R, A2, E2, R2>(self: Micro<A, E, R>, that: Micro<A2, E2, R2>): Micro<A | A2, E | E2, R | R2>; }

Source

Since v3.4.0