Function toJSON

  • Create an Object representation of a Result instance.

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

    Type Parameters

    • T

    • E

    Parameters

    • result: Result<T, E>

      The value to convert to JSON

    Returns ResultJSON<T, E>

    The JSON representation of the Result

Generated using TypeDoc