Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Feb 15, 2019
1 parent 0b0a427 commit c29e8e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/typescript/i18next-xhr-backend.ts
@@ -1,21 +1,21 @@
import * as XHR from "i18next-xhr-backend";
import XHR, { I18NextXhrBackend } from "i18next-xhr-backend";

const options: XHR.BackendOptions = {
const options: I18NextXhrBackend.BackendOptions = {
loadPath: "/locales/{{lng}}/{{ns}}.json",
addPath: "locales/add/{{lng}}/{{ns}}",
allowMultiLoading: false,
parse: (data: string) => data.replace(/a/g, ""),
crossDomain: false,
withCredentials: false,
ajax: (url: string, options: XHR.BackendOptions, callback: XHR.AjaxRequestCallback, data: {}) => { },
ajax: (url: string, options: I18NextXhrBackend.BackendOptions, callback: I18NextXhrBackend.AjaxRequestCallback, data: {}) => { },
queryStringParams: { v: "1.3.5" }
};

const xhr = new XHR();
xhr.init(options);
const xhr2 = new XHR(null, options);
const type: string = xhr.type;
const newOptions: XHR.BackendOptions = xhr.options;
const newOptions: I18NextXhrBackend.BackendOptions = xhr.options;
xhr.create("en", "ns", "key", "value");
xhr.create(["en", "us"], "ns", "key", "value");
xhr.read("en", "ns", (error: any, result: string | false) => { });
Expand Down

0 comments on commit c29e8e8

Please sign in to comment.