jb-core
Version:
jb design system core modules
18 lines • 718 B
TypeScript
/**
this is the core module of i18n in jb design system its is just a main store for keeping data and change config.
every helper method will implement as an independent functions and class, so modules only use instance of an this class as a input to each used function
*/
type I18nEventListeners = {
localeChange: VoidFunction[];
};
export declare class JBI18N {
#private;
locale: Intl.Locale;
constructor();
setLocale(locale: Intl.Locale): void;
addEventListener<K extends keyof I18nEventListeners>(key: K, callback: I18nEventListeners[K][0]): void;
callListeners(key: keyof I18nEventListeners): void;
}
export declare const i18n: JBI18N;
export {};
//# sourceMappingURL=i18n.d.ts.map