O'Reilly logo

Switching to Angular - Third Edition by Minko Gechev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required