@types/chai package (4.2.3) and had problems.Below are the errors I get using tsc version 3.6.3
node_modules/@types/chai/index.d.ts:121:9 - error TS8020: JSDoc types can only be used inside documentation comments.
121 any?, // actual value
~~~~
node_modules/@types/chai/index.d.ts:122:9 - error TS8020: JSDoc types can only be used inside documentation comments.
122 boolean? // showDiff
~~~~
node_modules/@types/chai/index.d.ts:126:16 - error TS2370: A rest parameter must be of an array type.
126 assert(...args: AssertionArgs): void;
Same for me
Okay I found the error for me, maybe it helps someone else:
The Typescript feature used in these lines (optional elements in tuple types) is pretty new and so old Typescript versions don't know it. So I removed ts-node and typescript from my package.json and reinstalled the newest version, now the error is gone
New entries in package.json:
"ts-node": "^8.4.1",
"typescript": "^3.6.3"
So @jugmabora maybe you should check if you are really using the Typescript version you mentioned above or if there is an old version hanging around
In addition I had a problem with two missing types, the fix for that was to change the Typescript target to "es2015"
Same for me
I also had this problem. I resolved it by updating typescript globally.
sudo npm install -g typescript@latest
https://stackoverflow.com/questions/39677437/how-to-update-typescript-to-latest-version-with-npm
Most helpful comment
Okay I found the error for me, maybe it helps someone else:
The Typescript feature used in these lines (optional elements in tuple types) is pretty new and so old Typescript versions don't know it. So I removed ts-node and typescript from my package.json and reinstalled the newest version, now the error is gone
New entries in package.json:
"ts-node": "^8.4.1", "typescript": "^3.6.3"So @jugmabora maybe you should check if you are really using the Typescript version you mentioned above or if there is an old version hanging around
In addition I had a problem with two missing types, the fix for that was to change the Typescript target to "es2015"