Skip to content

ExactInitOptions

ExactInitOptions<T> = { [K in keyof T]: K extends RevTurbineInitOptionKey ? T[K] : never }

Exact-check for init options (plan 233 REQ-2b).

A key the options do not declare becomes never, which turns a typo or a stale option into a compile error instead of a value the SDK silently ignores.

The motivating shape is the same one Exact was introduced for in plan 191: TypeScript’s excess-property check applies only to fresh object literals, so options assembled in a variable — or in an un-annotated useMemo, which is exactly how React integrations build them — carried unknown keys with no diagnostic at all.

Scope limit worth stating: this cannot catch a wrong VALUE. The escalated tenant_id defect was never reachable from here — that one is caught by init-time validation (REQ-1/REQ-2) and the reachable init status (REQ-3).

It is not true that a Playbook is beyond compile-time reach. An earlier version of this note claimed a served artifact is Record<string, unknown> “by necessity”; that was wrong. UnvalidatedConfigArtifact structurally requires the body arrays, so a truncated Playbook fails to compile at the localRuntime boundary. What genuinely cannot be checked is the artifact’s contents — whether a plan handle exists, whether a rule is satisfiable.

T