Unicode MessageFormat for JavaScript
    Preparing search index...

    The resolved value of a :currency, :integer, :number, :offset, or :unit expression.

    interface MessageNumber {
        dir: "ltr" | "rtl" | "auto";
        options: Readonly<Intl.NumberFormatOptions & Intl.PluralRulesOptions>;
        selectKey?: (keys: Set<string>) => null | string;
        toParts?: () => [MessageNumberPart];
        toString?: () => string;
        type: "number";
        valueOf(): number | bigint;
    }

    Hierarchy (View Summary)

    Index

    Properties

    dir: "ltr" | "rtl" | "auto"
    options: Readonly<Intl.NumberFormatOptions & Intl.PluralRulesOptions>
    selectKey?: (keys: Set<string>) => null | string

    In addition to matching exact values, numerical values may also match keys with the same plural rule category, i.e. one of zero, one, two, few, many, and other.

    Different languages use different subset of plural rule categories. For example, cardinal English plurals only use one and other, so a key zero will never be matched for that locale.

    toParts?: () => [MessageNumberPart]
    toString?: () => string
    type: "number"

    Methods

    • Returns number | bigint