mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-29 00:51:29 +08:00
Fixes to the typings so that they are used better
This commit is contained in:
32
i18next-xhr-backend/i18next-xhr-backend.d.ts
vendored
32
i18next-xhr-backend/i18next-xhr-backend.d.ts
vendored
@@ -1,5 +1,5 @@
|
||||
// Type definitions for i18next-xhr-backend 1.2.0
|
||||
// Project: http://i18next.com/
|
||||
// Project: https://github.com/i18next/i18next-xhr-backend
|
||||
// Definitions by: Jan Mühlemann <https://github.com/jamuhl>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
@@ -12,23 +12,25 @@ declare module 'i18next-xhr-backend' {
|
||||
interpolator: Interpolator
|
||||
}
|
||||
|
||||
interface BackendOptions {
|
||||
loadPath: string | Function,
|
||||
addPath: string,
|
||||
allowMultiLoading: boolean,
|
||||
parse: Function,
|
||||
crossDomain: boolean,
|
||||
withCredentials: boolean,
|
||||
ajax: Function
|
||||
}
|
||||
|
||||
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;
|
||||
options: BackendOptions;
|
||||
constructor(services: Services, options?: BackendOptions);
|
||||
init(services: Services, options?: BackendOptions): void;
|
||||
readMulti(languages: any[], namespaces: any[], callback: Function): void;
|
||||
read(language: {}, namespace: {}, callback: Function): void;
|
||||
loadUrl(url: string, callback: Function): void;
|
||||
create(languages: any[], namespace: string, key: string, fallbackValue: string): void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user