• A compile-time check that the given value/array/object is serializable via JSON.stringify.

    A value is serializable if any of these are true:

    • It is an object with a toJSON() function
    • It is an object with only serializable members.
    • It is an array with only serializable elements.
    • It is type boolean, string, number, null, or undefined.

    Type Parameters

    • T

    Parameters

    Returns T