Reputation: 5357
I have an Angular2 project using Typescript, in Visual Studio. I want to update Typescript from 1.8 to 2.0.x. In my system I have updated typescript and tsc -v
logs Version 2.0.10
The package.json, among others, contains
"devDependencies": {
....
"typescript": "^1.8.10",
"typings": "^1.3.1",
...
}
In order to update typescript, is it enough to change the version to "typescript": "^2.0.10"
in the package.json? Also, what is the relation of typescript and typings version, when it comes to update?
Upvotes: 28
Views: 48381
Reputation: 86800
Upvotes: 35
Reputation: 1555
Updating the typescript version in your package.json and running npm install
will be enough to upgrade the version you are using for your project.
Typescript 2.x has introduced a new way to manage types, using the @types/... qualifier npm packages - you can still use the typings you have been using before however - but you might wish to update that to the latest version which from npm at the time of writing this answer is 2.0.0
If you are interested, theres more info and a discussion about the new @types here https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/
Upvotes: 14