@types · TypeScript Deep Dive

  • e.g. for jquery you should be able to just start using $ globally in your project.
  • @types supports both global and module type definitions.
  • npm install @types/jquery –save-dev
  • As can be seen having a definition that supports global leak in automatically can be a problem for some team so you can chose to explicitly only bring in the types that make sense using the tsconfig.json compilerOptions.types e.g.
  • By default any definitions that support global consumption are included automatically.

Definitely Typed is definitely one of TypeScript’s greatest strengths. The community has effectively gone ahead and documented the nature of nearly 90% of the top JavaScript projects out there.

@basarat: Added a section on #TypeScript 2.0 `@types` to the free Deep Dive book :

#JavaScript #ReactJS #AngularJS

Definitely Typed is definitely one of TypeScript’s greatest strengths. The community has effectively gone ahead and documented the nature of nearly 90% of the top JavaScript projects out there.

This means that you can use these projects in a very interactive an exploratory manner, no need to have the docs open in a seperate window and making sure you don’t make a typo.

@types · TypeScript Deep Dive