Skip to main content

Interface: TypeInfo<T, D>

Experimental

Describes how SDK conversion helpers adapt an application value of type T for payload conversion.

transferTypeConverter performs an application-defined, payload-converter-independent transformation. For example, it can convert a class instance into a plain object before JSON serialization.

payloadConverterHint carries metadata for a specific payload converter and describes its value type D. For example, a Protobuf converter hint can identify the message type required to deserialize bytes.

On encoding, transfer type conversion runs before payload conversion. On decoding, payload conversion runs before transfer type conversion. Either mechanism may be used independently or they may be combined.

When transferTypeConverter is unspecified, D should be the same type as T.

SDK conversion helpers apply this information when supplied. Calling a PayloadConverter directly does not.

Type Parameters​

T​

T = unknown

D​

D = T

Properties​

payloadConverterHint?​

optional payloadConverterHint?: ConverterHint<D>

Experimental

Metadata forwarded unchanged to the payload converter.

Use this when conversion requires format-specific runtime information, such as a Protobuf message type.


transferTypeConverter?​

optional transferTypeConverter?: TransferTypeConverter<T, D>

Experimental

Converts between the application value and a representation suitable for payload conversion.

This transformation runs outside the payload converter and should not depend on its serialization format.