Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
# TransportSchedulerOptionsSchema
Zod boundary schema for `TransportScheduler` construction options.
## Purpose
Validates the options passed when constructing a `TransportScheduler`.
## Features
- Requires `transport` (any — runtime-validated)
- Requires `clock` as a function returning `number`
- Optional `pollIntervalMs` as positive number
## Usage
```ts
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.