Typescript compile error with 1.21.3
steve-baldwin opened this issue · 7 comments
steve-baldwin commented
Upgrading from 1.21.2 to 1.21.3 causes this:
[~/git/koopa-api] yarn tsc:check
yarn run v1.22.19
$ tsc --noEmit
node_modules/axios-mock-adapter/types/index.d.ts:55:6 - error TS2702: 'AxiosAdapter' only refers to a type, but is being used as a namespace here.
55 ) => AxiosAdapter.RequestHandler;
~~~~~~~~~~~~
Found 1 error in node_modules/axios-mock-adapter/types/index.d.ts:55
In case it matters, this is with:
- node 18.14.2
- typescript 5.0.2
The following tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es2017",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true
},
"exclude": ["jest.config.js"]
}
m-radzikowski commented
It also causes eslint to fail on @typescript-eslint/no-unsafe-member-access
and @typescript-eslint/no-unsafe-call
checks:
axiosMock.onPost().reply(200, '...');
eslint with plugin:@typescript-eslint/recommended-requiring-type-checking
:
44:2 error Unsafe member access .reply on an `any` value @typescript-eslint/no-unsafe-member-access
44:2 error Unsafe call of an `any` typed value @typescript-eslint/no-unsafe-call
waynemock commented
I'm seeing this issue as well
It also causes eslint to fail on
@typescript-eslint/no-unsafe-member-access
and@typescript-eslint/no-unsafe-call
checks:
axiosMock.onPost().reply(200, '...');
eslint with
plugin:@typescript-eslint/recommended-requiring-type-checking
:44:2 error Unsafe member access .reply on an `any` value @typescript-eslint/no-unsafe-member-access 44:2 error Unsafe call of an `any` typed value @typescript-eslint/no-unsafe-call
remcohaszing commented
This was fixed by #368, but it's not yet released.
pdbhoi commented
marcbachmann commented
Released as v1.21.4
pdbhoi commented
Released as v1.21.4
Thank you sir