TypeScript 6.0
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
2prompts
- JavaScript ES2026102 lines · 3.1K tokens
- 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 defaulttrue) and every strict-family check on in production; an inherited"strict": falseopts out. - Fail CI if
noCheckor--noCheckis set, since it reports only critical parse and emit errors; reject@ts-nocheckin security-sensitive files. - Require successful type checking before release:
tsc --noEmitfor transpiled or type-stripped builds,noEmitOnErrorwhentscemits production code, andcheckJsfor included JavaScript. - Enable
noUncheckedIndexedAccess,exactOptionalPropertyTypes,useUnknownInCatchVariables(narrow caught values before reading properties or exposing details),noImplicitOverride,noFallthroughCasesInSwitch, andnoImplicitReturns.
Trust boundaries
- Type parsed JSON, request bodies, environment variables, storage values, and SDK responses as
unknownat 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