MessageNumber class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

A child class of MessageValue for numerical values.

Signature:

export declare class MessageNumber extends MessageValue<number | bigint> 

Extends: MessageValue<number | bigint>

Constructors

Constructor Modifiers Description
(constructor)(locale, number, { meta, options, source })   (BETA) Constructs a new instance of the MessageNumber class

Properties

Property Modifiers Type Description
options?   Intl.NumberFormatOptions & Intl.PluralRulesOptions (BETA) (Optional)

Methods

Method Modifiers Description
getPluralCategory() protected (BETA)
selectKey(keys)   (BETA) In addition to matching exact values, numerical values will also match keys with the same plural rule category, i.e. one of zero, one, two, few, many, and other.
toParts()   (BETA)
toString(onError)   (BETA)