Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MaybeProvider<T>

Type parameters

  • T

Hierarchy

  • MaybeProvider

Implemented by

Index

Properties

Readonly isNone

isNone: boolean

Readonly isSome

isSome: boolean

Methods

defaulting

flatMap

get

  • get(): T

getOrElse

  • getOrElse(value: T): T
  • Returns the some value or the provided default value.

    Parameters

    • value: T

      the default value to use if this Maybe is none

    Returns T

    the default value or the some value

map

  • Transform the mapped element and return a new MaybeProvider with the result.

    Type parameters

    • R

    Parameters

    • f: (wrapped: T) => R

      the function to use

        • (wrapped: T): R
        • Parameters

          • wrapped: T

          Returns R

    Returns MaybeProvider<R>

Generated using TypeDoc