News for hackers. Stuff that matters.
Re:TIL: `satisfies` is my favorite TypeScript keyword by jstanley on Sunday November 23, 2025 @04:41AM (#46022073)
If it only works when you write the types correctly with no mistakes, what's the point? I thought the point of all this strong typing stuff was to detect mistakes.
Re:TIL: `satisfies` is my favorite TypeScript keyword by macguillicuddy on Sunday November 23, 2025 @05:40AM (#46022356)
Because adding types adds constraints across the codebase that detect a broader set of mistakes. It's like saying what's the point of putting seatbelts into a car if they only work when you're wearing them - yes you can use them wrong (perhaps even unknowingly), but the overall benefit is much greater. On balance I find that TypeScript gives me huge benefit.