News for hackers. Stuff that matters.
Re:TypeScript is terrible for library developers by throwaway0asd on Tuesday August 23, 2022 @05:02PM (#32571464)
Agreed! From the article:

How do library developers debug their highly dynamic and heavy use of conditional types, overloads?

Don’t do that. It dramatically increases compile time and results in a maintenance nightmare. Keep types primitive.

In my own code I use type unions of primitives and/or named types. For objects I use interfaces. With that I am able to provides types for about 98% of my code. That left over 2% is generally for extending the global Array type or extending an event.

There are no comments on this comment yet.