forked from i18next/i18next-xhr-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
43 lines (41 loc) · 1.47 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// declare module 'i18next-xhr-backend' {
// export class Backend {
// type: any;
// services: any;
// options: any;
// constructor(services: any, options?: {});
// init(services: any, options?: {}): void;
// readMulti(languages: any, namespaces: any, callback: any): void;
// read(language: any, namespace: any, callback: any): void;
// loadUrl(url: any, callback: any): void;
// create(languages: any, namespace: any, key: any, fallbackValue: any): void;
// }
//
// }
declare module 'i18next-xhr-backend' {
interface Interpolator {
interpolate: () => string
}
interface Services {
interpolator: Interpolator
}
export default class Backend {
type: 'backend';
services: Services;
options: {
loadPath: string | Function,
addPath: string,
allowMultiLoading: boolean,
parse: () => {},
crossDomain: boolean,
withCredentials: boolean,
ajax: () => void
};
constructor(services: Services, options?: {});
init(services: Services, options?: {}): void;
readMulti(languages: any[], namespaces: any[], callback: () => void): void;
read(language: {}, namespace: {}, callback: () => void): void;
loadUrl(url: string, callback: () => void): void;
create(languages: any[], namespace: string, key: string, fallbackValue: string): void;
}
}