export { I18nContext } from './i18n'; export { default as translate } from './hoc'; export * from './hooks'; export { default as tr } from './translate'; export type Translations = Record< string, { [language in L]: string; } >; export type ConvertMissingKey = (key: string, translations: Translations) => string; export type Preprocess = ( key: string, translations: Translations ) => string | boolean | undefined | null | void; export type Postprocess = (phrase: string) => string; export interface Transforms { [name: string]: (value: any) => string; } export interface TranslateProps< L extends string = string, T extends Translations = Translations, TG extends Translations = Translations > { t: TranslateLocal; g: TranslateType; getLocale(): L; } export interface TranslateType< L extends string = string, T extends Translations = Translations > { (key: keyof T & string, interpolation?: Interpolation): string; locale: L; has(key: string | number | symbol): key is keyof T; } export interface TranslateLocal< L extends string = string, T extends Translations = Translations, TG extends Translations = Translations > extends TranslateType { g: TranslateType; } /** A number behaves as a shorthand the smart_count value */ export type Interpolation = | { smart_count?: number; [key: string]: string | number | object | undefined; } | number;