logoalt Hacker News

afavourlast Sunday at 11:06 PM2 repliesview on HN

ReturnType is TypeScript, no? You’re using JSDoc to express but it’s a TypeScript type.


Replies

culilast Sunday at 11:12 PM

As I stated in the article, JSDoc is TypeScript :P

TypeScript utility types are available in JSDoc. You can pretty much copy-paste any typescript Type/Interface into JSDoc

Mogzollast Sunday at 11:15 PM

Isn't that the whole point of the article? For all intents and purposes, JSDoc IS TypeScript