TypeScript · Compiler and project settings
target
Selects the JavaScript version emitted. Modern targets ship smaller output and rely on evergreen browsers.
Syntax
"target": "ES2022"Example
Example
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022", "DOM"]
}
}More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.