Documentation - v7.17.0
    Preparing search index...

    Interface ObjectWithToJsonMethod

    An object that may define a toJSON() method, which jsonStringify detaches before serializing to avoid faulty overrides on some websites.

    interface ObjectWithToJsonMethod {
        toJSON?: () => unknown;
    }
    Index
    toJSON?: () => unknown

    Custom JSON serialization hook, as used by JSON.stringify.