logoalt Hacker News

tobyhinloopenyesterday at 7:12 AM2 repliesview on HN

> Take it from a massive TypeScript nerd: JSDoc is not an anti-TypeScript position to take. It is the same powerful static analysis without the build step.

Ahum https://nodejs.org/en/learn/typescript/run-natively


Replies

spoileryesterday at 8:02 AM

Technically there's still a build step happening under the hood! But another benefit of shifting TS into JSDoc comments is that it also works in browsers. That being said, while I understand the aversion to unnecessary complexity, I'm personally fine with a build step to remove TS. It's a much nicer syntax IMO. And with tools like `swc` for type stripping, it's pretty snappy too.

eevilspockyesterday at 7:49 AM

that's limited to node. won't work in a browser.