Umi — API References - v1.3.0
    Preparing search index...

    Type Alias UnwrappedOption<T, U>

    UnwrappedOption: T extends Some<infer TValue>
        ? UnwrappedOption<TValue, U>
        : T extends None
            ? U
            : T extends | string
            | number
            | boolean
            | symbol
            | bigint
            | undefined
            | null
            | Uint8Array
            | Date
                ? T
                : T extends object
                    ? { [key in keyof T]: UnwrappedOption<T[key], U> }
                    : T extends (infer TItem)[] ? UnwrappedOption<TItem, U>[] : T

    A type that defines the recursive unwrapping of a type T such that all nested Option types are unwrapped.

    For each nested Option type, if the option is a Some, it returns the type of its value, otherwise, it returns the provided fallback type U which defaults to null.

    Type Parameters

    • T
    • U = null