UNPKG

react-intl

Version:

Internationalize React apps. This library provides React components and an API to format dates, numbers, and strings, including pluralization and handling translations.

12 lines (11 loc) 625 B
import * as React from 'react'; import { ResolvedIntlConfig as CoreResolvedIntlConfig, IntlFormatters, Formatters } from '@formatjs/intl'; import { DEFAULT_INTL_CONFIG } from './utils'; export type IntlConfig = Omit<ResolvedIntlConfig, keyof typeof DEFAULT_INTL_CONFIG> & Partial<typeof DEFAULT_INTL_CONFIG>; export interface ResolvedIntlConfig extends CoreResolvedIntlConfig<React.ReactNode> { textComponent?: React.ComponentType | keyof React.ReactHTML; wrapRichTextChunksInFragment?: boolean; } export interface IntlShape extends ResolvedIntlConfig, IntlFormatters<React.ReactNode> { formatters: Formatters; }