UnwrappedOption
A type that recursively unwraps nested Option types.
This type resolves all nested Option values, ensuring that deeply wrapped values are properly extracted.
- If
Tis an Option, it resolves to the contained value. - If
Tis a known primitive or immutable type, it remains unchanged. - If
Tis an object or array, it recursively unwraps any options found.
The fallback type U (default: null) is used in place of None values.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
T | - | The type to be unwrapped. |
U | null | The fallback type for None values (defaults to null). |
Examples
Resolving nested Option types.
Resolving options inside objects and arrays.