/*! * React Native Globalize * * Copyright 2015-2020 Josh Swan * Released under the MIT license * https://github.com/joshswan/react-native-globalize/blob/master/LICENSE */ import { messageFormatter } from 'globalize'; import { Formatters, GlobalizeConfig, MessageFormatter, MessageFormatterOptions } from '../types'; /** * The globalize core library only supports number/string replacement values when formatting * messages. To support React Element values, a random UID token that does not conflict with other * parts of the string is used as a placeholder during message formatting. The formatted message * can then be broken up into parts based on the tokens and the React Element(s) inserted. * @param getMessageFormatter The normal Globalize messageFormatter function */ export declare function enhanceMessageFormatter(getMessageFormatter: typeof messageFormatter, config: GlobalizeConfig): (id: string | string[], options?: MessageFormatterOptions) => MessageFormatter; export declare function formatMessage(config: GlobalizeConfig, getMessageFormatter: Formatters['getMessageFormatter'], id: string | string[], values?: Record, options?: MessageFormatterOptions): string;