TypeScript's Built-In Type Declarations with the `--lib` Compiler Option
Since version 2.0, the built-in standard library type declarations have been split into modules in TypeScript. This allows to select which (of those built-in) declarations to include in the project.
There are several groups which can be defined with the
--lib compiler option (or via the
lib property in
- es6 / es2015
By default, if not set explicitly, TypeScript will include type declarations needed for web development, depending on the target: