0Pricing
TypeScript Academy · Lesson

Target, lib, module, JSX settings

Choose proper target/lib for emitted JS and available globals; set module and JSX to match your runtime/bundler.

Intro

Goal: Pick the right target (JS output), lib (ambient globals), module (import/export form), and JSX strategy for your app.

target option

target sets the ECMAScript version of emitted JS (e.g., ES2018, ES2020). Choose the lowest your runtime supports.

// tsconfig.json (excerpt)
{
  "compilerOptions": {
    "target": "ES2020"
  }
}

// TS may downlevel features based on target
const n = 10n; // BigInt requires ES2020+

All lessons in this course

  1. Strictness flags
  2. Target, lib, module, JSX settings
  3. Project References (intro)
← Back to TypeScript Academy