Reputation: 4268
I'm still learning to use typescript with react. Due to how slow react-scripts-ts was, I was turned off from it. I've tried the new typescript setup with babel 7 (react-webpack-typescript-babel) and its exceedingly fast. However there are some basic errors that I can't resolve.
Even though the project runs, in vscode I get the following errors:
I'm assuming this is a @types/react and typescript issue.
Upvotes: 3
Views: 2137
Reputation: 4268
Based on @lleon input, an old typescript version was the cause of my headache. I removed it npm un -g typescript
, added vscode user setting "typescript.tsdk": "node_modules\\typescript\\lib"
and restarted vscode. Works well so far.
Upvotes: 2