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:
+6
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user