@formatjs/intl
Version:
Internationalize JS apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.
10 lines (9 loc) • 541 B
TypeScript
import { Formatters, IntlFormatters, OnErrorFn, Part } from './types';
export declare function formatList(opts: {
locale: string;
onError: OnErrorFn;
}, getListFormat: Formatters['getListFormat'], values: ReadonlyArray<string>, options: Parameters<IntlFormatters['formatList']>[1]): string;
export declare function formatListToParts<T>(opts: {
locale: string;
onError: OnErrorFn;
}, getListFormat: Formatters['getListFormat'], values: ReadonlyArray<string | T>, options: Parameters<IntlFormatters['formatList']>[1]): Part[];