import { Duration } from "@tsplus/stdlib/data/Duration"; import { Effect } from "@effect/core/io/Effect/definition"; import { Maybe } from "@tsplus/stdlib/data/Maybe/definition"; /** * Returns an effect that will timeout this effect, returning `None` if the * timeout elapses before the effect has produced a value; and returning * `Some` of the produced value otherwise. * * If the timeout elapses without producing a value, the running effect will * be safely interrupted. * * WARNING: The effect returned by this method will not itself return until * the underlying effect is actually interrupted. This leads to more * predictable resource utilization. If early return is desired, then instead * of using `effect.timeout(d)`, use `effect.disconnect.timeout(d)`, which * first disconnects the effect's interruption signal before performing the * timeout, resulting in earliest possible return, before an underlying effect * has been successfully interrupted. * @tsplus static effect/core/io/Effect.Aspects timeout * @tsplus pipeable effect/core/io/Effect timeout * @tsplus location "@effect/core/io/Effect/operations/timeout" */ export declare function timeout(duration: Duration): (self: import("../definition").Effect) => import("../definition").Effect>; //# sourceMappingURL=timeout.d.ts.map