Coda by Ian Macalinao
    Preparing search index...

    Interface SentinelTypeNode<TType, TSentinel>

    Wraps another type and delimits it with a constant sentinel value written immediately after the wrapped type.

    When decoding, the wrapped type is decoded until the sentinel value is encountered, at which point decoding stops and the sentinel is discarded.

    Important

    For this node to work, the sentinel value must never occur within the encoded bytes of the wrapped type.

    interface SentinelTypeNode<
        TType extends TypeNode = TypeNode,
        TSentinel extends ConstantValueNode = ConstantValueNode,
    > {
        kind: "sentinelTypeNode";
        sentinel: TSentinel;
        type: TType;
    }

    Type Parameters

    Index
    kind: "sentinelTypeNode"
    sentinel: TSentinel

    The constant value written immediately after the wrapped type to mark its end.

    type: TType

    The wrapped type whose extent is delimited by the sentinel.