ld.← ALL FIELD NOTESSELECTED WORK ↗
FIELD NOTES / 27TYPESCRIPT & AI   ·   ENGINEERING PRACTICE

Strict TypeScript is a contract for the whole team.

Our TypeScript configuration gives humans and AI tools the same set of constraints to work within.

Make assumptions visible

Alongside strict mode, we use options including noUncheckedIndexedAccess, noImplicitReturns, and noFallthroughCasesInSwitch. These make potentially absent indexed values and certain control-flow mistakes harder to overlook.

At first, stricter checks can sound like friction. In practice, they push us to be explicit about cases the code needs to handle.

The compiler is part of the feedback loop

Much of our code is written with Claude Code. The compiler, IDE, and review process all work against the same configuration, and I have seen the tooling help produce code that satisfies those constraints.

Passing the type checker is not proof that generated code is correct or that every edge case is handled. Review and tests still matter. The benefit is a clearer contract and fewer unchecked assumptions for everyone working on the system.

Continue the conversation

KEEP READING / 26Why I changed my mind about .env files.

Another note from the notebook.