mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #4948 from heavywatal/follow-i18next-1.10
i18next: Add init() and setLng() with a two-arg callback
This commit is contained in:
Vendored
+5
-5
@@ -85,8 +85,8 @@ interface I18nextStatic {
|
||||
toLanguages(language: string): string[];
|
||||
regexEscape(str: string): string;
|
||||
};
|
||||
init(callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
init(options?: I18nextOptions, callback?: (t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
init(callback?: (err: any, t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
init(options?: I18nextOptions, callback?: (err: any, t: (key: string, options?: any) => string) => void ): JQueryDeferred<any>;
|
||||
lng(): string;
|
||||
loadNamespace(namespace: string, callback?: () => void ): void;
|
||||
loadNamespaces(namespaces: string[], callback?: () => void ): void;
|
||||
@@ -100,10 +100,10 @@ interface I18nextStatic {
|
||||
rules: any;
|
||||
setCurrentLng: (language: string) => void;
|
||||
};
|
||||
preload(language: string, callback?: (t: (key: string, options?: any) => string) => void ): void;
|
||||
preload(languages: string[], callback?: (t: (key: string, options?: any) => string) => void ): void;
|
||||
preload(language: string, callback?: (err: any, t: (key: string, options?: any) => string) => void ): void;
|
||||
preload(languages: string[], callback?: (err: any, t: (key: string, options?: any) => string) => void ): void;
|
||||
setDefaultNamespace(namespace: string): void;
|
||||
setLng(language: string, callback?: (t: (key: string, options?: any) => string) => void ): void;
|
||||
setLng(language: string, callback?: (err: any, t: (key: string, options?: any) => string) => void ): void;
|
||||
sync: {
|
||||
load: (languages: string[], options: I18nextOptions, callback: (err: Error, store: IResourceStore) => void ) => void;
|
||||
postMissing: (language: string, namespace: string, key: string, defaultValue: any, languages: string[]) => void;
|
||||
|
||||
Reference in New Issue
Block a user