Skip to content

Commit df7092a

Browse files
vshuhaievctimmerm
authored andcommitted
Use default import in typescript (#103)
1 parent ed61988 commit df7092a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,5 @@ function addHandler(method, handlers, handler) {
109109
}
110110
}
111111

112-
module.exports = module.exports.default = MockAdapter;
112+
module.exports = MockAdapter;
113+
module.exports.default = MockAdapter;

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ declare class MockAdapter {
4242
onAny: RequestMatcherFunc;
4343
}
4444

45-
export = MockAdapter;
45+
export default MockAdapter;

types/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import axios from "axios";
2-
import MockAdapter = require("axios-mock-adapter");
2+
import MockAdapter from "axios-mock-adapter";
33

44
const instance = axios.create();
55
const mock = new MockAdapter(instance);

0 commit comments

Comments
 (0)