/
index.d.ts
44 lines (41 loc) · 1.06 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
44
declare namespace I18NextChainedBackend {
interface BackendOptions {
/**
* array of existing i18next backends from https://www.i18next.com/plugins-and-utils.html#backends
*/
backends?: any[];
/**
* array of options in order of backends above
*/
backendOptions?: any[];
}
type LoadCallback = (error: any, result: string | false) => void;
}
export default class I18NextChainedBackend {
constructor(services?: any, options?: I18NextChainedBackend.BackendOptions);
init(
services?: any,
options?: I18NextChainedBackend.BackendOptions,
i18nextOptions?: any
): void;
read(
language: string,
namespace: string,
callback: I18NextChainedBackend.LoadCallback
): void;
create(
languages: string | string[],
namespace: string,
key: string,
fallbackValue: string
): void;
type: "backend";
services: any;
backends: any[];
options: I18NextChainedBackend.BackendOptions;
}
declare module "i18next" {
interface CustomPluginOptions {
backend?: I18NextChainedBackend.BackendOptions;
}
}