Hyperlinkv0.8.0-beta.28

Schedule

Schedule.setInputTypeconsteffect/Schedule.ts:2185
<T>(): <Output, Error, Env>(
  self: Schedule<Output, T, Error, Env>
) => Schedule<Output, T, Error, Env>

Sets the input type of the provided schedule without altering its behavior.

When to use

Use to adapt a schedule that does not depend on its input values.

Details

This helper is checked at compile time and does not change the schedule's runtime behavior.

Example (Setting a schedule input type)

import { Schedule } from "effect"

const schedule = Schedule.recurs(3).pipe(
  Schedule.setInputType<string>()
)
utility types
export const setInputType =
  <T>() => <Output, Error, Env>(self: Schedule<Output, T, Error, Env>): Schedule<Output, T, Error, Env> => self