UNPKG

andrei-bread-i18n

Version:

Small and type-safe package to create multi-language interfaces.

15 lines (14 loc) 507 B
import type { I18N } from "../i18n"; interface ReactI18N<I18NType extends I18N<any>> { readonly lang: ReturnType<I18NType["getLang"]>; get: I18NType["get"]; /** * @deprecated use `lang` instead */ getLang: I18NType["getLang"]; setLang: I18NType["setLang"]; subscribe: I18NType["subscribe"]; } export declare function useI18N<I18NType extends I18N<any>>(): ReactI18N<I18NType>; export declare function useTranslate<I18NType extends I18N<any>>(): I18NType["get"]; export {};