News for hackers. Stuff that matters.
Re:TIL: `satisfies` is my favorite TypeScript keyword by pjerem on Sunday November 23, 2025 @03:26AM (#46021757)
I’d say it depends. I always advocate for code that is easy to read and to understand, but in extremely rare conditions, hard to read code is the better solution.

Especially when it comes to signatures in Typescript, complex signatures can be used to create simple and ergonomic APIs.

But anyway you shouldn’t be allowed to push anything like this without multiple lines of comments documenting the thing. Unreadable code can be balanced with good documentation but I rarely saw this unfortunately.

Re:TIL: `satisfies` is my favorite TypeScript keyword by chuckadams on Sunday November 23, 2025 @07:18AM (#46022974)
Comments and tests. Vitest supports unit tests for types.