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.

  • Type Parameters

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

    Parameters

    • value: F

    Returns never

  • Type Parameters

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

    Parameters

    • value: F

    Returns never

  • Type Parameters

    • T extends {}

    Parameters

    • value: T

    Returns Maybe<T>