| ▲ | paulddraper 2 days ago | ||||||||||||||||
And in fact, this what the Closure Compiler does…typecheck based on JSDoc. However, the precision and completeness is not nearly what can be expressed in TypeScript. With generics particularly. | |||||||||||||||||
| ▲ | culi a day ago | parent [-] | ||||||||||||||||
Care to give an example? In another reply I pointed out how advanced JSDoc syntax's support for generics is.[0] Even allowing for `extends` and default values for generic slots. The clunkiest part is in the way you "pass in" a generic to a slot. But this is solved by typing the return type. I use generics pretty extensively and I've not yet come across a use-case JSDoc couldn't handle | |||||||||||||||||
| |||||||||||||||||