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

    Variable unwrapSomeOrElseConst

    unwrapSomeOrElse: <T, U>(option: Option<T>, fallback: () => U) => T | U

    Unwraps the value of an Option of type T or returns a custom fallback value. If the option is a Some, it returns its value, Otherwise, it returns the return value of the provided fallback callback.

    Type Declaration

      • <T, U>(option: Option<T>, fallback: () => U): T | U
      • Type Parameters

        • T
        • U

        Parameters

        Returns T | U

    Use unwrapOption instead.