Upgrading type bindings with Typings

If you upgrade a Javascript library, or the Typescript compiler, you will likely find that you need new type bindings.

Currently is more painful than you might expect.

If you want to list versions of type bindings for a library, you can do this:

typings info 'dt!node' --versions

This is a good way to determine if there are newer versions. If you re-install the library, it will update the typings.json to the latest:

typings install 'dt!node' --save --global

The problem is now you have two copies of the type bindings, so you’ll get even more errors than when you started. I’ve been able to fix this by deleting the typings folder, and re-running ‘typings install’.

Leave a Reply

Your email address will not be published. Required fields are marked *