868 B
868 B
TransportSchedulerOptionsSchema
Zod boundary schema for TransportScheduler construction options.
Purpose
Validates the options passed when constructing a TransportScheduler.
Features
- Requires
transport(any — runtime-validated) - Requires
clockas a function returningnumber - Optional
pollIntervalMsas positive number
Usage
import { TransportSchedulerOptionsSchema } from "@suaveplan/audio-transport";
const parsed = TransportSchedulerOptionsSchema.safeParse({
transport: myTransport,
clock: () => Date.now() / 1000,
});
API Reference
TransportSchedulerOptionsSchema—z.object({ transport, clock, pollIntervalMs })
Implementation Notes
transport is typed as z.any() because Zod cannot express the Transport class type at schema level. The constructor performs the actual instance check.