index.d.mts 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import * as i18nextMod from './index.js';
  2. import type { $Dictionary } from './typescript/helpers.js';
  3. import type { DefaultNamespace, Namespace } from './typescript/options.js';
  4. export type WithT<Ns extends Namespace = DefaultNamespace> = i18nextMod.WithT<Ns>;
  5. export type Interpolator = i18nextMod.Interpolator;
  6. export type ResourceStore = i18nextMod.ResourceStore;
  7. export type Formatter = i18nextMod.Formatter;
  8. export type Services = i18nextMod.Services;
  9. export type ModuleType = i18nextMod.ModuleType;
  10. export type Module = i18nextMod.Module;
  11. export type CallbackError = i18nextMod.CallbackError;
  12. export type ReadCallback = i18nextMod.ReadCallback;
  13. export type MultiReadCallback = i18nextMod.MultiReadCallback;
  14. export type BackendModule<TOptions = object> = i18nextMod.BackendModule<TOptions>;
  15. export type LanguageDetectorModule = i18nextMod.LanguageDetectorModule;
  16. export type LanguageDetectorAsyncModule = i18nextMod.LanguageDetectorAsyncModule;
  17. export type PostProcessorModule = i18nextMod.PostProcessorModule;
  18. export type LoggerModule = i18nextMod.LoggerModule;
  19. export type I18nFormatModule = i18nextMod.I18nFormatModule;
  20. export type FormatterModule = i18nextMod.FormatterModule;
  21. export type ThirdPartyModule = i18nextMod.ThirdPartyModule;
  22. export type Modules = i18nextMod.Modules;
  23. export type Newable<T> = i18nextMod.Newable<T>;
  24. export type NewableModule<T extends Module> = i18nextMod.NewableModule<T>;
  25. export type Callback = i18nextMod.Callback;
  26. export type ExistsFunction<
  27. TKeys extends string = string,
  28. TInterpolationMap extends object = $Dictionary,
  29. > = i18nextMod.ExistsFunction<TKeys, TInterpolationMap>;
  30. export type CloneOptions = i18nextMod.CloneOptions;
  31. export type * from './typescript/options.js';
  32. export type * from './typescript/t.js';
  33. export interface CustomInstanceExtensions {}
  34. // eslint-disable-next-line @typescript-eslint/naming-convention
  35. export interface i18n extends i18nextMod.i18n, CustomInstanceExtensions {}
  36. declare const i18next: i18n;
  37. export default i18next;
  38. export const createInstance: i18n['createInstance'];
  39. export const dir: i18n['dir'];
  40. export const init: i18n['init'];
  41. export const loadResources: i18n['loadResources'];
  42. export const reloadResources: i18n['reloadResources'];
  43. export const use: i18n['use'];
  44. export const changeLanguage: i18n['changeLanguage'];
  45. export const getFixedT: i18n['getFixedT'];
  46. export const t: i18n['t'];
  47. export const exists: i18n['exists'];
  48. export const setDefaultNamespace: i18n['setDefaultNamespace'];
  49. export const hasLoadedNamespace: i18n['hasLoadedNamespace'];
  50. export const loadNamespaces: i18n['loadNamespaces'];
  51. export const loadLanguages: i18n['loadLanguages'];