|
@@ -0,0 +1,36 @@
|
|
1
|
+// flow-typed signature: 57cf34196930be78935a42e5c8ac3cb6
|
|
2
|
+// flow-typed version: ae6284e7b7/react-i18next_v2.x.x/flow_>=v0.36.x_<=v0.39.x
|
|
3
|
+
|
|
4
|
+declare module 'react-i18next' {
|
|
5
|
+ declare type TFunction = (key?: ?string, data?: ?Object) => string;
|
|
6
|
+ declare type Locales = string | Array<string>;
|
|
7
|
+
|
|
8
|
+ declare type StatelessComponent<P> = (props: P) => ?React$Element<any>;
|
|
9
|
+
|
|
10
|
+ declare type Comp<P> = StatelessComponent<P> | Class<React$Component<*, P, *>>;
|
|
11
|
+
|
|
12
|
+ declare type Translator<OP, P> = {
|
|
13
|
+ (component: StatelessComponent<P>): Class<React$Component<void, OP, void>>;
|
|
14
|
+ <Def, St>(component: Class<React$Component<Def, P, St>>): Class<React$Component<Def, OP, St>>;
|
|
15
|
+ }
|
|
16
|
+
|
|
17
|
+ declare function translate<OP, P>(locales: Locales): Translator<OP, P>;
|
|
18
|
+
|
|
19
|
+ declare type NamespacesProps = {
|
|
20
|
+ components: Array<Comp<*>>,
|
|
21
|
+ i18n: { loadNamespaces: Function },
|
|
22
|
+ };
|
|
23
|
+
|
|
24
|
+ declare function loadNamespaces(props: NamespacesProps): Promise<void>;
|
|
25
|
+
|
|
26
|
+ declare type ProviderProps = { i18n: Object, children: React$Element<any> };
|
|
27
|
+
|
|
28
|
+ declare var I18nextProvider: Class<React$Component<void, ProviderProps, void>>;
|
|
29
|
+
|
|
30
|
+ declare type InterpolateProps = {
|
|
31
|
+ children?: React$Element<any>,
|
|
32
|
+ className?: string,
|
|
33
|
+ };
|
|
34
|
+
|
|
35
|
+ declare var Interpolate: Class<React$Component<void, InterpolateProps, void>>;
|
|
36
|
+}
|