1 | import { ResolvedIntlConfig as CoreResolvedIntlConfig, Formatters, IntlFormatters, MessageDescriptor } from '@formatjs/intl';
|
2 | import { FormatXMLElementFn, Options as IntlMessageFormatOptions, PrimitiveType } from 'intl-messageformat';
|
3 | import * as React from 'react';
|
4 | import { DEFAULT_INTL_CONFIG } from './utils';
|
5 | export type IntlConfig = Omit<ResolvedIntlConfig, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>;
|
6 | export interface ResolvedIntlConfig extends CoreResolvedIntlConfig<React.ReactNode> {
|
7 | textComponent?: React.ComponentType | keyof React.JSX.IntrinsicElements;
|
8 | wrapRichTextChunksInFragment?: boolean;
|
9 | }
|
10 | export interface IntlShape extends ResolvedIntlConfig, IntlFormatters<React.ReactNode> {
|
11 | formatMessage(this: void, descriptor: MessageDescriptor, values?: Record<string, PrimitiveType | FormatXMLElementFn<string, string>>, opts?: IntlMessageFormatOptions): string;
|
12 | formatMessage(this: void, descriptor: MessageDescriptor, values?: Record<string, React.ReactNode | PrimitiveType | FormatXMLElementFn<string, React.ReactNode>>, opts?: IntlMessageFormatOptions): Array<React.ReactNode>;
|
13 | formatters: Formatters;
|
14 | }
|