Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Just<A>

Type parameters

  • A

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Just(value: A): Just

Properties

tag

tag: "Just" = "Just"

value

value: A

Static pure

pure: of = Maybe.of

A common alias of Maybe.of

param

Methods

alt

ap

chain

  • chain<B>(f: function): Maybe<B>

map

  • map<B>(f: function): Maybe<B>

toString

  • toString(): string

zero

Static of

  • Wrap a value with Maybe.

    If the value is undefined or null, it will return "Nothing". Otherwise, it will return a "Just" containing the value.

    Type parameters

    • A

    Parameters

    • a: A

    Returns Maybe<A>

Generated using TypeDoc