I have the error: Subsequent variable declarations must have the same type
This is occurring because two of my dependencies, both of which I need; declare the same type.
Jest :/node_modules/@types/jest/index.d.ts
=> declare var test: jest.
testcafe node_modules/testcafe//ts-defs/index.d.ts
=> declare var test: TestFn;
My project is a react/redux project using webpack, babel and obviously Typescript.
The error occurs when I am running my dev server via npm start
which uses webpack-dev-server
. It also creates a problem when I run jest
since it uses testcafe's version of the declared Test
type.
How can this be resolved?
npm start
which useswebpack-dev-server
. It also creates a problem when I runjest
since it usestestcafe
's version of Test type. – Withoutnpm start
which is runningwebpack-dev-server
since jest nor testcafe are being executed. I think what is happening is typescript is checking all index.d.ts files associated with the project regardless if they are being used or not – Without