2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

Converting TypeScript definitions to ES2015 module syntax

This commit is contained in:
Nick Uraltsev
2016-08-09 23:17:11 -07:00
parent 8332392bfd
commit 5176dfdec5
4 changed files with 70 additions and 69 deletions
+6 -1
View File
@@ -24,7 +24,7 @@ function createInstance(defaultConfig) {
}
// Create the default instance to be exported
var axios = module.exports = createInstance();
var axios = createInstance();
// Expose Axios class to allow class inheritance
axios.Axios = Axios;
@@ -39,3 +39,8 @@ axios.all = function all(promises) {
return Promise.all(promises);
};
axios.spread = require('./helpers/spread');
module.exports = axios;
// Allow use of default import syntax in TypeScript
module.exports.default = axios;