Typegres API Reference - v0.2.0
    Preparing search index...

    Function safeStringify

    • JSON.stringify with a guard against accidentally serializing class instances.

      The default JSON.stringify walks every own-enumerable string-keyed property, which means TS-private fields (which are runtime-public, only the type system hides them), class fields, and other instance state can leak into the wire response.

      safeStringify throws on any class instance — only plain objects, arrays, and primitives reach the wire.

      Parameters

      • value: unknown

      Returns string