Are you using TypeScript 2.0? If so, try following the instructions here: http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html . Basically, there are "special" npm packages that you can install with types.
If you are not using TypeScript 2.0, do you use Gulp to compile TS code? If so, you can simply do:
var typings = require("gulp-typings"); gulp.task("typings", function () { return gulp.src("./typings.json") .pipe(typings()); });
This will put all the typings you specify in the typings.json file into the / typings folder.
If you use grunt instead, there is an npm runch-typings package, and I'm sure you can find similar packages for other build runners.
source share