--

I'll be curious to see if libraries can define complex generics, which are in fact necessary for libraries, with JSDoc. It seems to me that it's an extra step for the people who already know how to write them in TS to figure out how to translate that to JSDoc (I don't think anyone can first learn how to write them in JSDoc, but I'd be happy to be proven wrong). If rich generics aren't provided, the libraries will be unusable in TS. It's a pity you wrote an entire article on this and never touched on the real concern, which is creating generics that can adapt to the shape of the end user's types.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

No responses yet