ashik@dev

Engineering notes about type-safety

Articles, implementation notes, and lessons from projects involving type-safety.

cat ~/writing/type-safety

2 posts
A User ID Is Not a File ID: Nominal Types in Rust and TypeScriptHow newtypes in Rust and branded types in TypeScript stop values that share a representation from being mixed up, and the small macro I use to make the safe version the easy one.typescriptrusttype-safety8 min ->Narrowing Unknown Without Lying to the CompilerA small TypeScript and Zod helper that checks a nested property at runtime and narrows the type from the same dotted path, plus where it breaks and how I use it on third-party responses.typescriptzodtype-safety14 min ->