API reference › @evolu/common › Schedule › passthrough
Call Signature
function passthrough<A>(): Schedule<A, A>;
Defined in: packages/common/src/Schedule.ts:1007
Creates a schedule that outputs its input, or wraps an existing schedule to output input instead of the original output.
When called with no arguments, creates a schedule that outputs its input directly (the "identity" schedule). When called with a schedule, wraps it to preserve timing behavior but replace output with input.
Example
import { exponential, passthrough } from "@evolu/common";
interface MyError {
readonly message: string;
}
// Constructor: output equals input
const identity = passthrough<MyError>();
// Combinator: preserve timing, replace output
const withInput = passthrough(exponential("100ms"));
Call Signature
function passthrough<Output, Input>(
schedule: Schedule<Output, Input>,
): Schedule<Input, Input>;
Defined in: packages/common/src/Schedule.ts:1009