declare module "react-intl" { import { OptionalIntlConfig } from "react-intl/dist/components/provider"; import * as ReactIntl from "node_modules/react-intl"; export * from "node_modules/react-intl"; export interface MessageDescriptor { description?: string; defaultMessage: string; id?: string; } type Messages = Record< Names, MessageDescriptor >; type PrimitiveType = string | number | boolean | null | undefined | Date; type FormatXMLElementFn = (...args: any[]) => string | {}; export interface IntlFormatters extends Omit { formatMessage( descriptor: MessageDescriptor, values?: Record ): string; formatMessage( descriptor: MessageDescriptor, values?: Record< string, PrimitiveType | React.ReactElement | FormatXMLElementFn > ): string | React.ReactNodeArray; } export interface FormattedMessageProps< V extends Record = Record > extends MessageDescriptor { values?: V; tagName?: React.ElementType; children?(...nodes: React.ReactNodeArray): React.ReactNode; } export function defineMessages( messageDescriptors: Messages ): Messages; export interface IntlShape extends ReactIntl.IntlConfig, IntlFormatters { formatters: ReactIntl.Formatters; } export class FormattedMessage< TValues extends Record = Record< string, PrimitiveType | React.ReactElement | FormatXMLElementFn > > extends React.Component> {} export function useIntl(): IntlShape; export function createIntl(config: OptionalIntlConfig): IntlShape; }