TypeScript 6.0

Last reviewed Oct 11, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. TypeScript 6.044 lines · 1.3K tokens
Total146 lines · 4.4K 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 6.0, which precedes the native 7.0 compiler; treat each deprecation it reports as work to finish, not noise.

Compiler checks

  • Keep strict (6.0 default true) and every strict-family check on in production; an inherited "strict": false opts out.
  • Fail CI if noCheck or --noCheck is set, since it reports only critical parse and emit errors; reject @ts-nocheck in security-sensitive files.
  • Require successful type checking before release: tsc --noEmit for transpiled or type-stripped builds, noEmitOnError when tsc emits production code, 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