Type Alias IDecoder<TDecodedValue, TEncodedValue>

IDecoder: { decode(encodedValue: TEncodedValue): TDecodedValue }

Decoder contract defining the interface for converting encoded data to decoded format.

Common use cases:

  • JSON decoding: JSON string → object
  • Base64 decoding: base64 string → binary data
  • Decompression: compressed bytes → original data
  • Decryption: ciphertext → plaintext

Type Parameters

  • TDecodedValue

    The type produced by decoding (e.g., domain object, plaintext)

  • TEncodedValue

    The type consumed by decoding (e.g., JSON string, ciphertext, transport format)

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

Type declaration