Function just

Create a Maybe instance which is a Just.

null and undefined are allowed by the type signature so that the function may throw on those rather than constructing a type like Maybe<undefined>.

The type of the item contained in the Maybe.

The value to wrap in a Maybe.Just.

An instance of Maybe.Just<T>.

If you pass null or undefined.

  • Create an instance of Maybe.Just.

    Type Parameters

    • F extends (...args: any) => {}

    Parameters

    • value: F

      The value to wrap in a Maybe.Just.

    Returns Maybe<F>

    An instance of Maybe.Just<T>.

    If you pass null or undefined.

  • Create an instance of Maybe.Just.

    Type Parameters

    • T extends {}

      The type of the item contained in the Maybe.

    • F extends (...args: any) => undefined | null | T

    Parameters

    • value: F

      The value to wrap in a Maybe.Just.

    Returns never

    An instance of Maybe.Just<T>.

    If you pass null or undefined.

  • Create an instance of Maybe.Just.

    Type Parameters

    • F extends (...args: any) => undefined | null

    Parameters

    • value: F

      The value to wrap in a Maybe.Just.

    Returns never

    An instance of Maybe.Just<T>.

    If you pass null or undefined.

  • Create an instance of Maybe.Just.

    Type Parameters

    • T extends {}

      The type of the item contained in the Maybe.

    Parameters

    • value: T

      The value to wrap in a Maybe.Just.

    Returns Maybe<T>

    An instance of Maybe.Just<T>.

    If you pass null or undefined.