Underscore ambient declarations for TypeScript
To use underscore.js in the browser just add a reference comment on the top of the sources that use underscore.
/// <reference path="underscore.browser.d.ts" /> console.log(_.range(10));
If you are using underscore.js in a node.js environment, then you have to add a reference comment and import the underscore module where you need it.
/// <reference path="underscore.d.ts" /> import _ = module("underscore"); console.log(_.range(10));
You can also use this syntax on a browser through require.js.