# JSDoc

31 Hacker News commenters recommended JSDoc and 11 criticized it, November 2025 to November 2026. It was recommended in 4 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Lets JavaScript get TypeScript-style type checking through comments, with no build step. Common caveat: it cannot express everything TypeScript can, and generics and some imports are awkward.

## Why people recommend it

- No build step needed (5 comments): "you do not need a build step and the javascript you ship to the browser would be the same you write in your editor" ([source](https://news.ycombinator.com/item?id=48886716)) "it's quite nice to just be able to copy them to new projects and have it all work without a build step" ([source](https://news.ycombinator.com/item?id=46266964)) "TypeScript benefits can be had without a build step by leveraging JsDoc" ([source](https://news.ycombinator.com/item?id=48887303))
- Same checker as TypeScript (3 comments): "The advantage of JSDoc is that the TypeScript compiler treats it as equivalent to TypeScript source code" ([source](https://news.ycombinator.com/item?id=46270826)) "I'm simply pointing out that using JSDoc is using TypeScript. It's the same language service." ([source](https://news.ycombinator.com/item?id=46270786)) "Aside from the following, JSDoc is absolutely TypeScript." ([source](https://news.ycombinator.com/item?id=46268906))
- Covers most TypeScript features (4 comments): "tuples, `&` operator, and even generics all work perfectly well inside a `@type` declaration" ([source](https://news.ycombinator.com/item?id=46269959)) "JSDoc lets you do pretty much everything that isn't a runtime feature of TypeScript" ([source](https://news.ycombinator.com/item?id=46267877)) "I haven't run into anything you can do in TypeScript that you can't do in JSDoc." ([source](https://news.ycombinator.com/item?id=46268207))
- Types live outside function parameters (2 comments): "it makes code less dense because it lives outside the function parameters" ([source](https://news.ycombinator.com/item?id=46267830)) "jsdoc is nice because you don’t have to write the non-helpful types." ([source](https://news.ycombinator.com/item?id=46267442))

## What people warn about

- Weaker than TypeScript for advanced types (5 comments): "Support for generics is limited in JSDoc compared to TypeScript, especially when arrow function is involved." ([source](https://news.ycombinator.com/item?id=46268156)) "JSDoc doesn't support everything you need in TypeScript and there is a lot of inlining" ([source](https://news.ycombinator.com/item?id=46270951)) "JSDoc is not as powerful as TypeScript types but that might be fine for your use case" ([source](https://news.ycombinator.com/item?id=48887827))
- Verbose and clumsy to write (4 comments): "it's more annoying than just writing TypeScript" ([source](https://news.ycombinator.com/item?id=46268064)) "JavaScript with JSDoc is much more verbose, with a lot of limitations" ([source](https://news.ycombinator.com/item?id=46268092)) "this gets messy, repetitive and it's difficult to use algebraic types" ([source](https://news.ycombinator.com/item?id=46270963))
- Some tags and imports fail (4 comments): "@callback works the most of the time, except in such cases where these JSDoc tags don't work nicely together" ([source](https://news.ycombinator.com/item?id=46269544)) "Things like type star imports, destructured imports or satisfies operator don't work in jsdoc." ([source](https://news.ycombinator.com/item?id=46272528)) "Whatever I do, there is always a error. Meanwhile, it does not take much to TS code to work." ([source](https://news.ycombinator.com/item?id=46268701))

## Cite as

Hacker Approved, "JSDoc", https://hackerapproved.com/p/jsdoc/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
