import { Callback, FallbackLng, InitOptions, Module, TFunction, TFunctionResult, StringMap, TOptions, i18n, TFunctionKeys } from 'i18next';
import type { Options as FormatOptions } from 'intl-messageformat';
import { IntlModule } from './index';
declare module 'i18next' {
    interface InitOptions {
        /**
         * @deprecated https://starling.bytedance.net/open/content/9163/111691#插值相关
         */
        onParseError?: Function;
    }
}
export interface ICUConfig {
    strict?: boolean;
    formatOptions?: FormatOptions;
    open?: boolean;
}
export interface IntlInitOptions extends Omit<InitOptions, 'missingInterpolationHandler'> {
    formats?: any;
    postProcess?: any;
    thirdParamFallback?: boolean;
    ignoreWarning?: boolean;
    icuConfig?: ICUConfig;
    inContext?: boolean;
    missingInterpolationHandler?: (param: {
        key: string;
        text: string;
        locale: string;
        interpolation: {
            key: string;
            val: any;
        };
    }) => string;
}
export interface I18nextInstance {
    instance: i18n;
    config: InitOptions & {
        lng?: string;
        fallbackLng?: string[];
        [key: string]: any;
    };
    plugins: Module[];
    languages: FallbackLng;
    init: boolean;
    constructor(config: InitOptions, plugins: Module[]): any;
    createInstance(initCallback?: Callback): void;
    _updateLanguages(): void;
    getLanguages(): FallbackLng;
    changeLanguage(lng: any, callback: any): void;
    getDir(lng: string): 'ltr' | 'rtl';
    t: TFunction;
    addResourceBundle(lng: string, ns: string, resources: any, deep: boolean, overwrite: boolean): void;
}
/**
 * I18n内核
 * 安全校验
 */
export default class I18next {
    instance: i18n;
    config: InitOptions & {
        lng?: string;
        fallbackLng?: string[];
        [key: string]: any;
    };
    plugins: IntlModule[];
    languages: FallbackLng;
    init: boolean;
    userLng: string | null;
    private _waitingToAddResourceBundle;
    _handlePlugins(plugins: IntlModule[]): void;
    _handleConfigs(config: InitOptions): void;
    constructor(config?: InitOptions, plugins?: IntlModule[]);
    get language(): string;
    createInstance(): Promise<{
        err: Error;
        t: TFunction;
    }>;
    _updateLanguages(): void;
    getLanguages(): FallbackLng;
    changeLanguage(lng: string, callback?: Callback): void;
    changeLanguageWithPromise(lng: string): Promise<unknown>;
    getDir(lng: string): "ltr" | "rtl";
    t: <TResult extends TFunctionResult = string, TKeys extends TFunctionKeys = string, TInterpolationMap extends object = StringMap>(keys: TKeys | TKeys[], options?: string | TOptions<TInterpolationMap>, fallbackText?: string) => TResult;
    addResourceBundle(lng: string, ns: string, resources: any, deep?: boolean, overwrite?: boolean): i18n;
}
