Closed remcohaszing closed 1 year ago
According to the old type definitions, this was correct usage:
// CJS const MockAdapter = require('axios-mock-adapter'); const mock = new MockAdapter.default(/* … */)
// ESM import MockAdapter from 'axios-mock-adapter'; const mock = new MockAdapter.default(/* … */)
With the updated type definitions, this is:
// CJS const MockAdapter = require('axios-mock-adapter'); const mock = new MockAdapter(/* … */)
// ESM import MockAdapter from 'axios-mock-adapter'; const mock = new MockAdapter(/* … */)
This has always been an issue, but it has become more apparent with the "module": "node16" option introduced in TypeScript 4.7.
"module": "node16"
Sorry! I made an error!
This is fixed in #368.
According to the old type definitions, this was correct usage:
With the updated type definitions, this is:
This has always been an issue, but it has become more apparent with the
"module": "node16"
option introduced in TypeScript 4.7.