From 381ae95a1b5503e710133c84525a33cbbb2a2355 Mon Sep 17 00:00:00 2001 From: Thomas Guillory Date: Wed, 2 Sep 2015 14:33:41 +0200 Subject: [PATCH 1/3] FIX typescript definition to correctly type promise callbacks --- axios.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axios.d.ts b/axios.d.ts index 4c64531..877e0d1 100644 --- a/axios.d.ts +++ b/axios.d.ts @@ -26,8 +26,8 @@ declare module axios { } interface Promise { - then(response: axios.Response): axios.Promise; - catch(response: axios.Response): axios.Promise; + then(onFulfilled:(response: axios.Response) => void): axios.Promise; + catch(onRejected:(response: axios.Response) => void): axios.Promise; } interface RequestOptions { From 1ccd4161c7b525bb5efb444232ffe7f15c590d60 Mon Sep 17 00:00:00 2001 From: Milo Mordaunt Date: Thu, 24 Sep 2015 15:53:41 -0300 Subject: [PATCH 2/3] Added defaults.timeout to default config. --- lib/axios.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/axios.js b/lib/axios.js index e29e9eb..ca9ba15 100644 --- a/lib/axios.js +++ b/lib/axios.js @@ -9,6 +9,7 @@ var axios = module.exports = function (config) { config = utils.merge({ method: 'get', headers: {}, + timeout: defaults.timeout, transformRequest: defaults.transformRequest, transformResponse: defaults.transformResponse }, config); From d9835663bfd7ec2605495d7b56a7d84c94fa2f52 Mon Sep 17 00:00:00 2001 From: Grant Miner Date: Sun, 27 Sep 2015 10:55:07 -0500 Subject: [PATCH 3/3] Add grunt-cli and phantomjs, allows for "npm install" and then "npm run test" on a fresh clone. --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index eb2375e..9429dd3 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "es6-promise": "^3.0.2", "grunt": "^0.4.5", "grunt-banner": "^0.5.0", + "grunt-cli": "^0.1.13", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-nodeunit": "^0.4.1", "grunt-contrib-watch": "^0.6.1", @@ -49,6 +50,7 @@ "karma-webpack": "^1.7.0", "load-grunt-tasks": "^3.2.0", "minimist": "^1.1.3", + "phantomjs": "^1.9.18", "webpack": "^1.11.0", "webpack-dev-server": "^1.10.1" },