Introduction
Ambient declarations allow you to safely use existing popular JavaScript libraries and incrementally migrate your JavaScript/CoffeeScript/Other-Compile-To-Js-Language project to TypeScript.
Declaration Files
Syntax is simple:
declare var foo: anyDeclarations can be put in a .ts or .d.ts file, ie: global.d.ts or
vendor.d.ts
Best Practices
- Use
.d.ts - Use interfaces where possible