Functions
getUnitDecoder
getUnitDecoder():
FixedSizeDecoder
<void
,0
>
Returns a decoder for void
values.
This decoder always returns undefined
and has a fixed size of 0 bytes.
It is useful when working with structures that require a no-op decoder,
such as empty variants in getDiscriminatedUnionDecoder.
For more details, see getUnitCodec.
Returns
FixedSizeDecoder
<void
, 0
>
A FixedSizeDecoder<void, 0>
, representing an empty decoder.
Example
Decoding a void
value.