Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.69 KB

File metadata and controls

29 lines (19 loc) · 1.69 KB
title ParseOptions
parent @messageformat/parser
grand_parent API Reference

ParseOptions interface

Options for the parser

Signature:

export interface ParseOptions 

Properties

Property Modifiers Type Description
cardinal? PluralCategory[]

(Optional) Array of valid plural categories for the current locale, used to validate plural keys.

If undefined, the full set of valid PluralCategory keys is used. To disable this check, pass in an empty array.

ordinal? PluralCategory[]

(Optional) Array of valid plural categories for the current locale, used to validate selectordinal keys.

If undefined, the full set of valid PluralCategory keys is used. To disable this check, pass in an empty array.

strict? boolean (Optional) By default, the parsing applies a few relaxations to the ICU MessageFormat spec. Setting strict: true will disable these relaxations.
strictPluralKeys? boolean (Optional) By default, the parser will reject any plural keys that are not valid Unicode CLDR plural category keys. Setting strictPluralKeys: false will disable this check.