Using predefined ambient type definitions

Fortunately, we don't have to create ambient type definitions for all JavaScript libraries and frameworks we use. The community and/or the authors of these libraries have already published such definitions online; the biggest repository resides at https://github.com/DefinitelyTyped/DefinitelyTyped. During the last couple of months, the community developed a few tools for managing ambient type definitions, such as tsd and typings.

Later, Microsoft introduced an official way to manage them: using npm by providing an additional configuration in tsconfig.json. The type definitions are now distributed as scoped packages under the @types namespace and installed in node_modules.

Let's create a directory ...

Get Switching to Angular - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.