Typescript 2.0 gets rid of previous Typings system.
Now Typescript 2.0 should by default look into ./node_modules/@types
and get types that you installed as the separate node modules, e.g. npm install --save @types/react
(as mentioned by @David Sherret)
There is a bug in the current version Typescript 2.0 beta, which does not load new types. Manually via cmd new tsc compiles files, but there is no IntelliSense support in VS 2015, and no errors are showed while a .ts file is in edit mode.
To resolve it modify tsconfig.json
with the similar settings:
{
"compilerOptions": {
// ... other config rows
"typeRoots": [ "node_modules/@types/" ],
"types": [ "jquery", "react", "react-dom", /*... your other types */ ],
}
}
For me manual "types"
declaration helped resolved this issue, for other guys "typeRoots"
helped. Hopefully it will save developer's hours.
dt~***
syntax ? – Superload