import type { ArgsFromToken, MergedLocalizerTokens, GetMessageArgs, LocalizerComponentProps, } from '../localization/localeTools'; import { CrowdinLocale } from '../localization/constants'; export type I18nMethods = { /** @see {@link window.i18n.stripped} */ stripped: (...[token, args]: GetMessageArgs) => string | T; strippedWithObj: ( opts: LocalizerComponentProps ) => string | T; /** @see {@link window.i18n.inEnglish} */ inEnglish: (...[token, args]: GetMessageArgs) => string | T; /** @see {@link window.i18n.formatMessageWithArgs */ getRawMessage: ( crowdinLocale: CrowdinLocale, ...[token, args]: GetMessageArgs ) => string | T; /** @see {@link window.i18n.formatMessageWithArgs} */ formatMessageWithArgs: ( rawMessage: string, args?: ArgsFromToken ) => string | T; }; export type SetupI18nReturnType = I18nMethods & ((...[token, args]: GetMessageArgs) => string);