4 ms·
VS Code will automatically pull type definitions from npmjs.org, so you get code highlighting and inline errors for free (not sure how much such automation is i
by wereHamster 9y ago
VS Code will automatically pull type definitions from npmjs.org, so you get code highlighting and inline errors for free (not sure how much such automation is included in VS2017).
Many npm modules come with their own typings. Those which don't usually have them in the definitelytyped repo. For those 'npm install <foo> @types/<foo>' should be enough so that typescript can find both the code and corresponding type definitions.
The rest of your setup seems to be related how you build and bundle the files. I use webpack and a typescript loader, and there is literally nothing more that I have to do after installing the packages, I can just import (or require) them in my code.