• Option is a dynamic-size type. Serializing an option depends on whether it is empty or not:

    • if it's empty, there is zero bytes (the size is 0).
    • if it's not empty, just serialize the inner item (the size is same as the inner item's size).

    Type Parameters

    • T extends Codec<Uint8Array, any, any, BytesLike, T>

    Parameters

    • itemCodec: T

    Returns OptionCodec<T>

Generated using TypeDoc