Coda by Ian Macalinao
    Preparing search index...

    Interface OptionTypeNode<TItem, TPrefix>

    A value that may be present or absent (Some/None), with an explicit numeric prefix indicating presence.

    interface OptionTypeNode<
        TItem extends TypeNode = TypeNode,
        TPrefix extends
            NestedTypeNode<NumberTypeNode> = NestedTypeNode<NumberTypeNode>,
    > {
        fixed?: boolean;
        item: TItem;
        kind: "optionTypeNode";
        prefix: TPrefix;
    }

    Type Parameters

    Index
    fixed?: boolean

    When true, the absent variant still occupies the byte size of the present variant (zero-padded). Defaults to false.

    item: TItem

    The type carried by the option when present.

    kind: "optionTypeNode"
    prefix: TPrefix

    The numeric type used as the presence flag.