DEV Community

Discussion on: To TS or not to TS, that is NOT the question. Is it?

Collapse
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

// @ts-check is from TypeScript pragma, it makes VSCode use TS to validate your code (to explain it on a simplified way).

Didn't read the post, did you? You can enforce it with the ESLint plugin JSDoc.

By the way:
type intersections JSDoc

On the other hand you're right with Generics, you cannot use them with this approach as far as I know.

Last but not least, it's somewhat worrying that you consider JSDoc (The standard way to document JS and TS code) a whole new language 😅

Thread Thread
 
brense profile image
Rense Bakker

Yes lets discuss what you consider a language. JSdoc has a learning curve. Its worrying that you would try to deny that or didnt get that point.