Skip to content

Commit

Permalink
Use default import in typescript (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
vshuhaiev authored and ctimmerm committed Jan 25, 2018
1 parent ed61988 commit df7092a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@ function addHandler(method, handlers, handler) {
}
}

module.exports = module.exports.default = MockAdapter;
module.exports = MockAdapter;
module.exports.default = MockAdapter;
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ declare class MockAdapter {
onAny: RequestMatcherFunc;
}

export = MockAdapter;
export default MockAdapter;
2 changes: 1 addition & 1 deletion types/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from "axios";
import MockAdapter = require("axios-mock-adapter");
import MockAdapter from "axios-mock-adapter";

const instance = axios.create();
const mock = new MockAdapter(instance);
Expand Down

0 comments on commit df7092a

Please # to comment.