Creates a type-safe relay function for an option.
All values returned by the relay are made immutable, ensuring that structured results (plain objects and arrays) are deep-frozen before being returned to the caller. Primitive values pass through unchanged.
The options type defining all possible option variants
An option variant
A Relay function that accepts handlers for each option and an optional fallback
Creates a type-safe relay function for an option.
All values returned by the relay are made immutable, ensuring that structured results (plain objects and arrays) are deep-frozen before being returned to the caller. Primitive values pass through unchanged.