Web Technologies - TypeScript

Back to Course

Lesson Description

Lession - #1454 TypeScript Definitely Typed

NPM packages in the broad JavaScript ecosystem does not always have types available.

Sometimes the systems are no longer maintained, and other times they are not interested in, agree with, or have time to use TypeScript.

Usingnon-typed NPM packages in TypeScript
Using untyped NPM packages with TypeScript won't be type safe due to lack of types.

To help TypeScript developers use similar packages, there's a community maintained project called Definitely Typed.

Definitely Typed is a project that provides a central repository of TypeScript definitions for NPM packages which don't have types.


npm install save- dev@types jquery 

No other steps are usually needed to use the types after installing the declaration package, TypeScript will automatically pick up the types when using the package itself.

Online compiler