diff --git a/npm/react-intl/3.0/@n4jsd/react-intl/lib/index.n4jsd b/npm/react-intl/3.0/@n4jsd/react-intl/lib/index.n4jsd index 364d87a..5bf593a 100644 --- a/npm/react-intl/3.0/@n4jsd/react-intl/lib/index.n4jsd +++ b/npm/react-intl/3.0/@n4jsd/react-intl/lib/index.n4jsd @@ -18,6 +18,36 @@ export external public interface ~__MessageDescriptor { public description?: string | Object; } +/** + * @see https://formatjs.io/docs/react-intl/api#formatlist + */ +export external public interface ~IntlListFormatOptions { + /** + * The locale matching algorithm to use. + * Possible values are "lookup" and "best fit"; the default is "best fit". + * For information about this option, see + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation. + */ + public localeMatcher?: 'best fit' | 'lookup'; + /** + * The format of output message. + * Possible values are : + * - "conjunction" that stands for "and"-based lists (default, e.g., "A, B, and C") + * - "disjunction" that stands for "or"-based lists (e.g., "A, B, or C"). + * - "unit" stands for lists of values with units (e.g., "5 pounds, 12 ounces"). + */ + public type?: 'conjunction' | 'disjunction' | 'unit'; + /** + * The length of the formatted message. + * Possible values are: + * - "long" (default, e.g., "A, B, and C"); + * - "short" (e.g., "A, B, C"), or + * - "narrow" (e.g., "A B C"). + * When style is "short" or "narrow", "unit" is the only allowed value for the type option. + */ + public style?: 'long' | 'short' | 'narrow'; +} + /** * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat * without localeMatcher @@ -48,6 +78,7 @@ export external public interface ~__IntlFormat { */ public formatRelativeTime: (value: number, unit: string=, opts: FormatRelativeTimeOptions=) => string; public formatNumber: (value: any, options: NumberFormatOptions=) => string; + public formatList: (elements: string[], options: IntlListFormatOptions=) => string; public formatMessage: (messageDescriptor: __MessageDescriptor, values: Object=) => string; }