import { I18nConfig, I18nForkConfig, I18nLocales, I18nLangLocales, I18nFallbacks, I18nUnknownPhraseListener, I18nProcessor } from './types'; export default class Config implements I18nConfig { defaultLocale: string; locales: I18nLocales; fallbacks: I18nFallbacks; objectNotation: boolean; cookieName: string; queryParameter: string; unknownPhraseListener: I18nUnknownPhraseListener; processors: I18nProcessor[]; isDestroyed: boolean; private readonly isConstructed; private isFork; private forks; private forkLinkedFields; constructor(config?: I18nConfig, isFork?: boolean); /** * Change config. * @param config - Config options. * @returns Config. */ configure({ defaultLocale, locales, fallbacks, objectNotation, cookieName, queryParameter, unknownPhraseListener, processors }: I18nConfig): this; /** * Destroy instance. */ destroy(): void; /** * Copy current config with some overrides. * @param config - Config with overrides. * @returns Forked config. */ fork(config?: I18nForkConfig, hard?: boolean): Config; /** * Copy current config with some overrides. * @param config - Config with overrides. * @param hard - Do hard fork without linked fields. * @returns Forked config. */ fork(config: I18nConfig, hard: true): Config; /** * Call given method for all forks. * @param caller - Function to call method of fork. * @param flagName - Flag name to check ability to call method. */ private callForkMethod; /** * Create translate function copy, binded to another config. * @param fn - Translate function. * @returns Binded function. */ bind(fn: T): T; /** * Create translate functions copy, binded to another config. * @param fns - Translate functions. * @returns Binded functions. */ bind(fns: [A?, B?, C?, D?]): [A?, B?, C?, D?]; /** * Set function to call when unknown phrase was translated. * @param listener - Locale change listener. * @returns Config. */ onUnknownPhrase(listener: I18nUnknownPhraseListener): this; /** * Set current locale. * @param locale - Locale to set. * @returns Config. */ setLocale(locale: string): this; /** * Get current locale. * @param checkFallback - Flag to use fallback or not. * @param localeToCheck - Locale to handle. * @param strict - Should fall back to default locale or not. * @returns Current locale. */ getLocale(checkFallback?: true, localeToCheck?: string, strict?: boolean): string; /** * Get available locales. * @returns Available locales. */ getLocales(): string[]; /** * Get whole catalog optionally based on given locale. * @param locale - Locale to get sub-catalog. * @returns Catalog. */ getCatalog(locale?: string): I18nLangLocales; /** * Add new translations. * @param locale - Locale to add. * @param catalog - Catalog for localte to add. * @returns Config. */ addLocale(locale: string, catalog: I18nLangLocales): this; /** * Remove translations. * @param locale - Locale to remove. * @returns Config. */ removeLocale(locale: string): this; } //# sourceMappingURL=config.d.ts.map