Function fromNullable

  • Maybe constructor from optional or nullable value

    Resolves to 'nothing' in case of undefined or null value and 'just value' otherwise

    Parameters

    • value: undefined

      possibly undefined value

    Returns Nothing<never>

    either 'just value' or 'nothing'

  • Parameters

    • value: null

    Returns Nothing<never>

  • Type Parameters

    • R

    Parameters

    • value: Exclude<R, undefined | null>

    Returns Just<R>

  • Type Parameters

    • R

    Parameters

    • value: undefined | null | R

    Returns Maybe<R>

Generated using TypeDoc