Latest article
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.
Types / boundaries / better code
A blog about TypeScript in production software, focused on the practical context of using the language in real applications.
Latest article
Use Map<string, number> when keyed data needs Map operations, and keep object properties separate from Map entries.
TypeScript catches certain mismatches before code runs, but its types disappear from the JavaScript that handles real inputs.
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.
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