i18next: Modify 'callback' to take two arguments.

This commit is contained in:
Watal M. Iwasaki
2015-07-19 22:24:02 +09:00
parent aaa447bd7e
commit 0bae9f2cb7
+3 -5
View File
@@ -85,8 +85,7 @@ 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;
@@ -101,10 +100,9 @@ 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;