From 08bd3dc0e8a3c2370e4e8abbaa241eaafc144f4c Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 28 May 2017 01:10:54 +0200 Subject: add linting rules and fix them --- src/http.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/http.ts') diff --git a/src/http.ts b/src/http.ts index 965a44a97..895b10973 100644 --- a/src/http.ts +++ b/src/http.ts @@ -46,10 +46,10 @@ export interface HttpRequestLibrary { */ export class BrowserHttpLib { private req(method: string, - url: string, - options?: any): Promise { + url: string, + options?: any): Promise { return new Promise((resolve, reject) => { - let myRequest = new XMLHttpRequest(); + const myRequest = new XMLHttpRequest(); myRequest.open(method, url); if (options && options.req) { myRequest.send(options.req); @@ -57,10 +57,10 @@ export class BrowserHttpLib { myRequest.send(); } myRequest.addEventListener("readystatechange", (e) => { - if (myRequest.readyState == XMLHttpRequest.DONE) { - let resp = { + if (myRequest.readyState === XMLHttpRequest.DONE) { + const resp = { + responseText: myRequest.responseText, status: myRequest.status, - responseText: myRequest.responseText }; resolve(resp); } -- cgit v1.2.3