Testing & Code Quality

tsconfig Strictness

TypeScript strictness options determine how aggressively the compiler rejects unsafe patterns. strict is the baseline; additional flags catch indexing, optional-property, override, and unchecked access bugs.
  • strict is the serious-project baseline
  • noUncheckedIndexedAccess makes indexing honest
  • exactOptionalPropertyTypes tightens optional semantics
  • noImplicitOverride protects inheritance
  • Strictness migration should be planned
Strictness profile
{
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "exactOptionalPropertyTypes": true,
    "noImplicitOverride": true,
    "noFallthroughCasesInSwitch": true
  }
}
These options move common runtime mistakes into compiler feedback.
Strictness options
OptionCatches
strictCore strict checking family
noUncheckedIndexedAccessPossibly missing indexed values
exactOptionalPropertyTypesAmbiguous optional vs undefined
noImplicitOverrideAccidental non-overrides
noFallthroughCasesInSwitchUnintentional switch fallthrough
noImplicitReturnsMissing return paths
Sources
  • TypeScript ReferenceTSConfig strictness options
  • Effective TypeScript, 2nd EditionCompiler configuration
  • typescript-eslint DocumentationTyped linting