Bits and Bytes: Adding TypeScript Support to an Existing Project

Sign in to queue

The Discussion

  • User profile image
    Robert

    Joshua, I can't believe how you were adding TypeScript declaration files to the project. It would have been better to point out how to use the NPM module tsd Install tsd:
    `npm install -g tsd`

    Then you just cd to the project directory and run:
    `tsd angular`

    This pulls down the TypeScript declaration file directly form the DefintelyTyped Github repository. It also pulls down any dependency declaration files as well.

  • User profile image
    jdruid

    Great comment! I was trying to show the typescript definition for all of the different libraries. I will be sure to add that to my blog post and another video.

    Here is a link to the tsd that was mentioned above for all interested: http://definitelytyped.org/tsd/ most libraries are there.

  • User profile image
    Laurent​Duveau

    Using VS Code you can also just click on the light-bulb (while typing angular.??) to automatically get the typing file.

Add Your 2 Cents