In tsconfig file, you have target
and libs
configuration.
You always need to define a target
, recommended as es2022
Specifying the lib
option also lets us drill down into the specific features and libraries we want to include in our project, which we will see more of later.
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022" , "ESNext.Intl"],
// rest of config as before
Without libs
, by default, it includes["DOM", "DOM.Iterable"]
as well, if you give libs
with some values, the default values will be replaced