@hatsuboshi/types
    Preparing search index...

    Interface JSONSerializable<T>

    TODO

    interface JSONSerializable<T> {
        toJSON(): T;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Implemented by

    Index
    • Returns the JSON-serializable representation of this object.

      Tip

      The result can be passed back into the constructor to reconstruct an equivalent instance.

      Returns T

      // t1 and t2 are deeply equal
      const t1: T = new T({ ... })
      const t2: T = new T(t1.toJSON())