UNPKG

1.81 kBJavaScriptView Raw
1import { createFormattedComponent, createFormattedDateTimePartsComponent, } from './src/components/createFormattedComponent';
2export { createIntlCache, UnsupportedFormatterError, InvalidConfigError, MissingDataError, MessageFormatError, MissingTranslationError, IntlErrorCode as ReactIntlErrorCode, IntlError as ReactIntlError, } from '@formatjs/intl';
3export function defineMessages(msgs) {
4 return msgs;
5}
6export function defineMessage(msg) {
7 return msg;
8}
9export { default as injectIntl, Provider as RawIntlProvider, Context as IntlContext, } from './src/components/injectIntl';
10export { default as useIntl } from './src/components/useIntl';
11export { default as IntlProvider, createIntl } from './src/components/provider';
12// IMPORTANT: Explicit here to prevent api-extractor from outputing `import('./src/types').CustomFormatConfig`
13export var FormattedDate = createFormattedComponent('formatDate');
14export var FormattedTime = createFormattedComponent('formatTime');
15// @ts-ignore issue w/ TS Intl types
16export var FormattedNumber = createFormattedComponent('formatNumber');
17export var FormattedList = createFormattedComponent('formatList');
18export var FormattedDisplayName = createFormattedComponent('formatDisplayName');
19export var FormattedDateParts = createFormattedDateTimePartsComponent('formatDate');
20export var FormattedTimeParts = createFormattedDateTimePartsComponent('formatTime');
21export { FormattedNumberParts, FormattedListParts, } from './src/components/createFormattedComponent';
22export { default as FormattedRelativeTime } from './src/components/relative';
23export { default as FormattedPlural } from './src/components/plural';
24export { default as FormattedMessage } from './src/components/message';
25export { default as FormattedDateTimeRange } from './src/components/dateTimeRange';