0007. TypeScript strictness; TypeScript 6.0 for now
- Status: Accepted
- Date: 2026-11-22
Context
Money logic and optional fields are where type holes turn into wrong answers.
Decision
strict, plusnoUncheckedIndexedAccessandexactOptionalPropertyTypes, in every workspace (tsconfig.base.json); ESM withmoduleResolution: bundler; no emit (bundlers build).- If
exactOptionalPropertyTypesfights a library's types, relax it with a new ADR that names the library, never withascasts orany. - TypeScript 6.0.x until typescript-eslint supports TypeScript 7 (its peer range is
<6.1.0as of 2026-11-23). Dependabot ignores TypeScript 7 until then. - ESLint uses typescript-eslint's
strictTypeCheckedrules.
Consequences
- Index access returns
T | undefined, so lookups need explicit handling. - Optional properties can't be set to
undefinedby accident. - Moving to TypeScript 7 is a follow-up once the lint tooling supports it.