• Turns the input object into an JSON object.

    Type Parameters

    • const T

      Type of the output object

    Parameters

    • obj: any

      The input object

    • Optional typeGuard: TypeGuardFunction<T>

      The type guard function, ensures that the output object is of the expected type, refer to TypeGuardFunction for an example.

    Returns T

    The JSON object

    Remarks

    It is equivalent to (except a bit more performant due to custom options)

    let obj = { ... }
    parse(stringify(obj), { extended: true })

Generated using TypeDoc