Type Alias ISerdeTransformer<TDeserializedValue, TSerializedValue>

ISerdeTransformer: {
    name: OneOrMore<string>;
    deserialize(serializedValue: TSerializedValue): TDeserializedValue;
    isApplicable(value: unknown): value is TDeserializedValue;
    serialize(deserializedValue: TDeserializedValue): TSerializedValue;
}

Custom serialization transformer for specialized handling of non-class objects. Provides type detection, serialization, and deserialization logic for custom types.

Use transformers for:

  • Built-in types with special serialization rules (e.g., Date, Map, Set)
  • Domain objects without class definitions
  • Values requiring custom transformation logic

Type Parameters

  • TDeserializedValue

    The runtime/decoded type

  • TSerializedValue extends SerializedValueBase

    The serialized/encoded representation type

    IMPORT_PATH: "@daiso-tech/core/serde/contracts"

Type declaration