import { ReactNode } from "react"; import { BaseLocale, LocaleKeys, LocaleValue, Params, Scopes } from "international-types"; //#region src/types.d.ts type ScopedValue | undefined, Key extends LocaleKeys> = Scope extends undefined ? Locale[Key] : Locale[`${Scope}.${Key}`]; type ReactParamsObject = Record[number], LocaleValue | ReactNode>; type TranslateFn = , Value extends LocaleValue = ScopedValue>(key: Key, ...params: Params['length'] extends 0 ? [] : [ReactParamsObject]) => string; type ScopedTranslateFn = >(scope: Scope) => , Value extends LocaleValue = ScopedValue>(key: Key, ...params: Params['length'] extends 0 ? [] : [ReactParamsObject]) => string; //#endregion export { ReactParamsObject, ScopedTranslateFn, ScopedValue, TranslateFn };