Typescript 2.0 gets rid of the previous typing system.
Now Typescript 2.0 should by default look at ./node_modules/@types and get the types that you set as separate node modules, for example. npm install --save @types/react (as mentioned by @David Sherret)
In the current version of Typescript 2.0 beta strong> there is an error that does not load new types. Manually using cmd new tsc compiles the files, but in VS 2015 there is no IntelliSense support, and no errors were found while the .ts file is in edit mode.
To solve this problem, change tsconfig.json to similar settings:
{ "compilerOptions": { // ... other config rows "typeRoots": [ "node_modules/@types/" ], "types": [ "jquery", "react", "react-dom", /*... your other types */ ], } }
For me, a manual declaration of "types" helped solve this problem, for other guys, "typeRoots" helped. Hope this saves development time.
Artru Aug 24 '16 at 20:26 2016-08-24 20:26
source share