t-tasks
    Preparing search index...

    Function fromMaybe

    • Standalone Maybe value extractor

      Applied to 'just value' returns underlying value without using fallback Applied to 'nothing' returns fallback

      Type Parameters

      • R

        underlying value type

      Parameters

      • maybe: Just<R>

        Maybe instance

      • fallback: unknown

        value to be returned in case of 'nothing'

      Returns R

      underlying value or fallback

    • Standalone Maybe value extractor

      Applied to 'just value' returns underlying value without using fallback Applied to 'nothing' returns fallback

      Type Parameters

      • R

        underlying value type

      • R2

        fallback value type

      Parameters

      • maybe: Nothing<R>

        Maybe instance

      • fallback: R2

        value to be returned in case of 'nothing'

      Returns R2

      underlying value or fallback

    • Standalone Maybe value extractor

      Applied to 'just value' returns underlying value without using fallback Applied to 'nothing' returns fallback

      Type Parameters

      • R

        underlying value type

      • R2

        fallback value type

      Parameters

      • maybe: Maybe<R>

        Maybe instance

      • fallback: R2

        value to be returned in case of 'nothing'

      Returns R | R2

      underlying value or fallback