import { Effect } from "@effect/core/io/Effect/definition"; import { Either } from "@tsplus/stdlib/data/Either/definition"; /** * Returns an effect that races this effect with the specified effect, * returning the first successful `A` from the faster side. If one effect * succeeds, the other will be interrupted. If neither succeeds, then the * effect will fail with some error. * * Note that both effects are disconnected before being raced. This means that * interruption of the loser will always be performed in the background. This * is a change in behavior compared to ZIO 2.0. If this behavior is not * desired, you can use [[Effect#raceWith]], which will not disconnect or * interrupt losers. * @tsplus static effect/core/io/Effect.Aspects race * @tsplus pipeable effect/core/io/Effect race * @tsplus location "@effect/core/io/Effect/operations/race" */ export declare function race(that: Effect): (self: import("../definition").Effect) => import("../definition").Effect; /** * Returns an effect that races this effect with the specified effect, * returning the first successful `A` from the faster side. If one effect * succeeds, the other will be interrupted. If neither succeeds, then the * effect will fail with some error. * @tsplus static effect/core/io/Effect.Aspects raceAwait * @tsplus pipeable effect/core/io/Effect raceAwait * @tsplus location "@effect/core/io/Effect/operations/race" */ export declare function raceAwait(that: Effect): (self: import("../definition").Effect) => import("../definition").Effect; /** * Returns an effect that races this effect with the specified effect, * yielding the first result to succeed. If neither effect succeeds, then the * composed effect will fail with some error. * * WARNING: The raced effect will safely interrupt the "loser", but will not * resume until the loser has been cleanly terminated. * @tsplus static effect/core/io/Effect.Aspects raceEither * @tsplus pipeable effect/core/io/Effect raceEither * @tsplus location "@effect/core/io/Effect/operations/race" */ export declare function raceEither(that: Effect): (self: import("../definition").Effect) => import("../definition").Effect>; /** * Returns an effect that races this effect with the specified effect, * yielding the first result to complete, whether by success or failure. If * neither effect completes, then the composed effect will not complete. * * WARNING: The raced effect will safely interrupt the "loser", but will not * resume until the loser has been cleanly terminated. If early return is * desired, then instead of performing `l raceFirst r`, perform * `l.disconnect raceFirst r.disconnect`, which disconnects left and right * interrupt signal, allowing a fast return, with interruption performed * in the background. * @tsplus static effect/core/io/Effect.Aspects raceFirst * @tsplus pipeable effect/core/io/Effect raceFirst * @tsplus location "@effect/core/io/Effect/operations/race" */ export declare function raceFirst(that: Effect): (self: import("../definition").Effect) => import("../definition").Effect; //# sourceMappingURL=race.d.ts.map