Skip to content

Codec

@wuespace/telestion / nats / Codec

Type parameters

T

Methods

decode()

decode(a): T

Decode an Uint8Array from a message payload into a T

Parameters

a: Uint8Array

Returns

T


encode()

encode(d): Uint8Array

Encode T to an Uint8Array suitable for including in a message payload.

Parameters

d: T

Returns

Uint8Array