Types / boundaries / better code
TypeScript in Production: TypeScript in Real Software
A blog about TypeScript in production software, focused on the practical context of using the language in real applications.
Pick a starting point
Latest articles
Configure, migrate, and verify projects
A Passing Playwright Test Is Not a Type Check: Add `tsc` to Your Workflow
Run Playwright for browser behavior and a separate TypeScript compiler check for test code; a pass from either tool answers a different question.
Represent and transform application data
How to Get an Array Element and Its Index in TypeScript
Use the second forEach callback parameter for an item’s index, or choose entries() or an indexed loop when they make the job clearer.
Represent and transform application data
TypeScript Record: Type a Fixed Key Set or an Open Dictionary
Use a finite key union when every named entry is required, and Record<string, Value> when the keys are open-ended.
Represent and transform application data
How to Type a TypeScript Class: Fields, Constructors, Methods, and Inheritance
Type class fields, constructors, and methods in one Account example, then extend it while keeping compiler checks separate from runtime behavior.
Configure, migrate, and verify projects
How to Choose and Pin a TypeScript Version for an Existing Project
Choose a compiler version within your framework and tooling constraints, pin it locally, and test it in the workflows your project already uses.
Configure, migrate, and verify projects
Set Up typescript-eslint: Start with Syntax Rules, Add Type-Aware Linting When It Pays
Start with a scoped flat config, use the TypeScript-aware unused-variable rule, and add typed linting only where its checks justify the cost.
Represent and transform application data
Using a Typed Map in TypeScript: Entries, Iteration, and When to Choose It
Use Map<string, number> when keyed data needs Map operations, and keep object properties separate from Map entries.
Validate data at runtime and across boundaries
What TypeScript Checks Before Production—and What It Leaves to Runtime
TypeScript catches certain mismatches before code runs, but its types disappear from the JavaScript that handles real inputs.
Configure, migrate, and verify projects
How to Check a TypeScript Type Question in an Online Playground
Reduce a type question to a small snippet, compare an accepted assignment with a deliberate mismatch, and record the settings before applying the result to a project.
Represent and transform application data
TypeScript Enums at Runtime: When to Choose Them Over String Unions
Choose a string-literal union for a compile-time restriction, or a regular enum when your code also needs named members and a runtime object.
Keep the next useful detail within reach.
Follow via RSS









