How a Branded Cents Type Eliminated an Entire Class of Bugs Across 97 Files
typescript
dev.to
TypeScript branded types turned compile-time into our most reliable financial auditor here is the pattern, the code, and the lessons from deploying it across a real production PWA. Estimated reading time: 9 minutes The Penny That Should Not Exist Open your browser console right now and type 0.1 + 0.2. Go ahead, I will wait. You got 0.30000000000000004. Not 0.3. Every developer discovers this at some point and shrugs it off. But when you are building software that handles someone