tsdvisual-studio-code

Does it make sense to check-in Visual Studio Code typings folder with dts?


Working with Visual Studio Code. It suggested to import types definition and downloaded them into /typings folder.

Do I need to check this folder in or it can be restored somehow?

Thanks.


Solution

  • I found that checking in the tsd.json helps with setting up new developers or even reinstalling typings if you need to clone the repo somewhere as tsd wont know what to reinstall if you do not.

    1. tsd init (this creates the tsd.json file)
    2. tsd install node --save (this will create the typings folder if there isn't one and add the node typing to the tsd.json)
    3. check in the tsd.json file and gitignore the typings folder(tsd uses the json to recreate your typings folder)
    4. tell co-workers to tsd install from root to get that typing goodness!

    source: https://github.com/DefinitelyTyped/tsd#quick-start