import { Effect } from "@effect/core/io/Effect/definition"; import type { Decision } from "@effect/core/io/Schedule/Decision"; export declare const ScheduleSym: unique symbol; export type ScheduleSym = typeof ScheduleSym; export declare const _Env: unique symbol; export type _Env = typeof _Env; export declare const _In: unique symbol; export type _In = typeof _In; export declare const _Out: unique symbol; export type _Out = typeof _Out; export declare const _State: unique symbol; export type _State = typeof _State; /** * A `Schedule` defines a recurring schedule, which consumes * values of type `In`, and which returns values of type `Out`. * * Schedules are defined as a possibly infinite set of intervals spread out over * time. Each interval defines a window in which recurrence is possible. * * When schedules are used to repeat or retry effects, the starting boundary of * each interval produced by a schedule is used as the moment when the effect * will be executed again. * * Schedules compose in the following primary ways: * * - Union: performs the union of the intervals of two schedules * - Intersection: performs the intersection of the intervals of two schedules * - Sequence: concatenates the intervals of one schedule onto another * * In addition, schedule inputs and outputs can be transformed, filtered (to * terminate a schedule early in response to some input or output), and so * forth. * * A variety of other operators exist for transforming and combining schedules, * and the companion object for `Schedule` contains all common types of * schedules, both for performing retrying, as well as performing repetition. * * @tsplus type effect/core/io/Schedule */ export interface Schedule { readonly [ScheduleSym]: ScheduleSym; readonly [_Env]: () => Env; readonly [_In]: (_: In) => void; readonly [_Out]: () => Out; readonly initial: State; readonly step: (now: number, input: In, state: State) => Effect; } /** * @tsplus type effect/core/io/Schedule.Ops */ export interface ScheduleOps { $: ScheduleAspects; } export declare const Schedule: ScheduleOps; /** * @tsplus type effect/core/io/Schedule.Aspects */ export interface ScheduleAspects { } //# sourceMappingURL=definition.d.ts.map