diff --git a/i18next-xhr-backend/i18next-xhr-backend.d.ts b/i18next-xhr-backend/i18next-xhr-backend.d.ts index fb3223ad7a..3340b91ef9 100644 --- a/i18next-xhr-backend/i18next-xhr-backend.d.ts +++ b/i18next-xhr-backend/i18next-xhr-backend.d.ts @@ -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 // 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; } } \ No newline at end of file