Hongbo Miao Hongbo Miao - 3 months ago 23
TypeScript Question

How to update typings.json and typing files?

My typings.json is like this:

{
"globalDependencies": {
"aws-sdk": "registry:dt/aws-sdk#0.0.0+20160606153210"
},
"dependencies": {
"lodash": "registry:npm/lodash#4.0.0+20160416211519"
}
}


Right now when I want to update, I need run all
typings install XXX --save
again.

Any other way to update typings.json and typing files?

Is there something like
typings update
?

Answer

TypeScript 2.x solves the issue. TypeScript 2.x installs typings through npm, for example:

npm install --save-dev @types/node

So now the typings files are all in package.json with version like below, instead of typings.json.

"@types/node": "4.0.30"

Now you can update your typings like other npm packages.

Comments