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>.

    Type Parameters

    • T

    Parameters

    • Optional value: null | T

      The value to wrap in a Maybe.Just.

      Optional

    Returns Maybe<T>

    An instance of Maybe.Just<T>.

    Typeparam

    T The type of the item contained in the Maybe.

    Throws

    If you pass null or undefined.

Generated using TypeDoc