-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.d.ts
29 lines (23 loc) · 887 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { ReactNode, ComponentType, ComponentClass } from 'react';
declare namespace reactI18nJed {
export const I18nProvider: ComponentType<{ i18n: I18n; children?: ReactNode }>;
interface Translate {
<P extends { i18n: I18n }>(x: ComponentType<P>): ComponentClass<Omit<P, 'i18n'>>;
}
export const translate: Translate;
export const useI18n: () => I18n;
export const sprintf: (arg0: string, ...rest: (string | number)[]) => string;
export interface I18n {
lang: string;
gettext: (keyTxt: string) => string;
pgettext: (ctx: string, keyTxt: string) => string;
ngettext: (keyTxt: string, pluralTxt: string, count: number) => string;
npgettext: (
ctx: string,
keyTxt: string,
pluralTxt: string,
count: number
) => string;
}
}
export = reactI18nJed;