Coda by Ian Macalinao
    Preparing search index...

    Interface AmountTypeNode<TNumber>

    Wraps a number type to provide additional context such as decimal places and a unit. Useful for amounts representing financial values.

    interface AmountTypeNode<
        TNumber extends
            NestedTypeNode<NumberTypeNode> = NestedTypeNode<NumberTypeNode>,
    > {
        decimals: number;
        kind: "amountTypeNode";
        number: TNumber;
        unit?: string;
    }

    Type Parameters

    Index
    decimals: number

    The number of decimal places the wrapped integer carries. For example, an integer value of 12345 with 2 decimal places represents 123.45.

    kind: "amountTypeNode"
    number: TNumber

    The number type the amount wraps.

    unit?: string

    The unit of the amount — e.g. "USD" or "%".