News for hackers. Stuff that matters.
Re:TypeScript is terrible for library developers by cogman10 on Tuesday August 23, 2022 @04:52PM (#32571336)
Yup.

Especially since types are documentation. If you are using some meta dynamic type garbage, then I as a user of the API am left to wonder "Ok, this takes <U, K extends keyof U>... WTF is it expecting?"

This isn't to say that sort of thing is ALWAYS wrong, but rather it should be the exception and not the rule.

You do types because constraints make code clearer. By having a BF compiler in the middle of your template definition, you've defeated the types and you might as well put an `any` there with docs that say "here there be dragons!"

There are no comments on this comment yet.