3 ms·
You can write TypeScript types in JSDoc.
by adhamsalama 2y ago
You can write TypeScript types in JSDoc.
- sureIy 2y agoYou can’t write complex TypeScript types in JSDoc, which is what GP said. The moment you need to declare or extend a type you’re done, you have to do so in a separate .ts file. It would be possible to do so and import it in JSDoc, but as mentioned before it’s a huge PITA on top of the PITA that writing types can already be (e.g. function/callbacks/generics)