TypeScript 5.9

Last reviewed Oct 11, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. TypeScript 5.940 lines · 1.2K tokens
Total142 lines · 4.3K tokens

CWE Coverage

  • 20
  • 73
  • 79
  • 89
  • 95
  • 117
  • 200
  • 208
  • 209
  • 323
  • 338
  • 346
  • 347
  • 352
  • 362
  • 459
  • 471
  • 494
  • 502
  • 602
  • 770
  • 807
  • 829
  • 838
  • 862
  • 915
  • 916
  • 918
  • 922
  • 943
  • 1004
  • 1321
  • 1333

Prompt Preview

Apply the JavaScript ES2026 baseline first. These rules cover TypeScript 5.9.

Compiler checks

  • Enable strict with every strict-family check in production; fail CI if noCheck or --noCheck is set, since it reports only critical parse and emit errors.
  • Gate deployment on a successful type check of all production sources, with noEmitOnError (default false) when tsc emits release files and checkJs for included JavaScript.
  • Enable noUncheckedIndexedAccess, exactOptionalPropertyTypes, useUnknownInCatchVariables (narrow caught values before reading properties or exposing details), noImplicitOverride, noFallthroughCasesInSwitch, and noImplicitReturns.

Trust boundaries

  • Type parsed JSON, request bodies, environment variables, storage values, and SDK responses as unknown at entry points; narrow them with runtime schemas or type guards checking every security-relevant property and rejecting unknown keys that could enable mass assignment, policy bypass, or version confusion.
  • Never use type assertions, including doubles like value as unknown as TrustedType, to make untrusted data an authenticated identity, authorization decision, validated command, or other incompatible security type; keep validated branded types distinct from raw strings for identifiers, URLs, paths, secrets, and tenant-scoped keys.
  • Prohibit any at trust boundaries, containing unavoidable any in a small reviewed adapter; avoid non-null assertions on request, configuration, lookup, or async values.
  • Never suppress errors with @ts-ignore or file-level @ts-nocheck;