Technology guide
Use AI to change TypeScript without hiding uncertainty
TypeScript can expose incorrect assumptions before runtime, but only when generated changes preserve meaningful types and validate data crossing untrusted boundaries.
Reviewed against official sources · 2026-09-11
01
Treat types as domain contracts
Read existing interfaces, schemas, generated clients, and compiler settings before changing them. Avoid broad casts or any-shaped escape hatches that silence a mismatch instead of resolving it.
02
Validate data at runtime boundaries
Compile-time types disappear at runtime. Validate external requests, environment configuration, provider responses, stored data, and user-controlled input before trusting their shape.
03
Keep changes narrow and traceable
Update consumers with the source contract, preserve discriminated unions and exhaustive handling, and review generated files separately from hand-authored code. Prefer a small coherent diff over duplicated compatibility layers.
04
Run the actual project checks
Use the repository’s pinned compiler and build scripts. A standalone type check can pass while framework compilation, tests, generated code, or bundling still fail. Report skipped checks and blockers explicitly.
Primary sources
Product capabilities change. These official pages were used for the factual statements above; verify them again before making a purchasing decision.
