Function toJSON

  • Create an Object representation of a Maybe instance.

    Useful for serialization. JSON.stringify() uses it.

    Type Parameters

    • T

    Parameters

    • maybe: Maybe<T>

      The value to convert to JSON

    Returns MaybeJSON<unknown>

    The JSON representation of the Maybe