Interface IJSONSerializable<T, TM>

Interface for objects that can be serialized to JSON, with to and from JSON methods

interface IJSONSerializable<T, TM> {
    fromJSON(data, meta?): IJSONSerializable<T, TM> | Promise<IJSONSerializable<T, TM>>;
    toJSON(meta?): T;
}

Type Parameters

  • T = any

  • TM = any

Methods

  • Parameters

    • Optional meta: TM

    Returns T