home.social

#jsdoc — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #jsdoc, aggregated by home.social.

fetched live
  1. The not-so-new-anymore `@import` #JSDoc tag support that landed in TypeScript 5.5 makes it much, much nicer to import type definitions ✨

    ```
    /** @import {Page, Post} from "../types.js" */

    /**
    * Build permalinks for pages and posts
    * @param {Page | Post} entry
    * @return {string}
    */
    ```

    Great for keeping JSDoc blocks tidy, and especially nice when the same type is used multiple times throughout a single script.

    multiline.co/mment/2024/02/imp

  2. The not-so-new-anymore `@import` #JSDoc tag support that landed in TypeScript 5.5 makes it much, much nicer to import type definitions ✨

    ```
    /** @import {Page, Post} from "../types.js" */

    /**
    * Build permalinks for pages and posts
    * @param {Page | Post} entry
    * @return {string}
    */
    ```

    Great for keeping JSDoc blocks tidy, and especially nice when the same type is used multiple times throughout a single script.

    multiline.co/mment/2024/02/imp

  3. JSDocs в VSCode

    Меня зовут Алекс Гусев. В этой публикации я очень кратко раскрываю, почему переход с IntelliJ IDEA (PhpStorm) на VSCode ломает привычную работу с JSDoc в JavaScript-проектах.

    habr.com/ru/articles/980286/

    #javascript #jsdoc #vscode #lsp #анализ_кода

  4. So, apparently #JSDoc *is* #TypeScript now! 😂 In a twist no one saw coming, adding comments to #JavaScript is the same as a whole new language! 🚀 I'm sure the TypeScript devs are thrilled to hear their work boiled down to some docstring wizardry. 🙄
    culi.bearblog.dev/jsdoc-is-typ #developer #humor #coding #humor #HackerNews #ngated

  5. So, apparently #JSDoc *is* #TypeScript now! 😂 In a twist no one saw coming, adding comments to #JavaScript is the same as a whole new language! 🚀 I'm sure the TypeScript devs are thrilled to hear their work boiled down to some docstring wizardry. 🙄
    culi.bearblog.dev/jsdoc-is-typ #developer #humor #coding #humor #HackerNews #ngated

  6. JSDoc as the ideal typing tool for JavaScript. @vanillaweb argues that JavaScript, enhanced with JSDoc and TypeScript’s tsc for type checking, can deliver the same safety and clarity as TypeScript and without build complexity. He explains how to configure jsconfig.json and tsconfig.json, showing how JSDoc makes code self-documenting and flexible. #javascript #jsdoc

    thathtml.blog/2025/12/nuances-

  7. JSDoc as the ideal typing tool for JavaScript. @vanillaweb argues that JavaScript, enhanced with JSDoc and TypeScript’s tsc for type checking, can deliver the same safety and clarity as TypeScript and without build complexity. He explains how to configure jsconfig.json and tsconfig.json, showing how JSDoc makes code self-documenting and flexible. #javascript #jsdoc

    thathtml.blog/2025/12/nuances-

  8. JSDoc как идеальный инструмент типизации для JavaScript. Джаред Уайт утверждает, что JavaScript в сочетании с JSDoc и проверкой типов через TypeScript tsc обеспечивает ту же безопасность и ясность, что и TypeScript, но без лишней сборки. Он описывает настройку jsconfig.json и tsconfig.json и показывает, как JSDoc делает код самодокументируемым и гибким. #js #jsdoc

    thathtml.blog/2025/12/nuances-

  9. JSDoc как идеальный инструмент типизации для JavaScript. Джаред Уайт утверждает, что JavaScript в сочетании с JSDoc и проверкой типов через TypeScript tsc обеспечивает ту же безопасность и ясность, что и TypeScript, но без лишней сборки. Он описывает настройку jsconfig.json и tsconfig.json и показывает, как JSDoc делает код самодокументируемым и гибким. #js #jsdoc

    thathtml.blog/2025/12/nuances-

  10. @chriskirknielsen Quick idea : as #JSDoc seems highly similar to #PHPDoc and the original #Javadoc , you might have some luck with tools written for any of those as well.

  11. @chriskirknielsen Quick idea : as #JSDoc seems highly similar to #PHPDoc and the original #Javadoc , you might have some luck with tools written for any of those as well.

  12. Do any of you fellow nerds have a tool that parses (select) JS files for #JSDoc comments and spits out _something_ that can be used as-is or plugged into some kind of documentation template?

    This project I'm on has about a zillion (well documented!) functions and I'd love to be able to share them with new team members. Instead of saying "uuuh yeah we have a timezone-stripping date function _somewhere_…", it would just be like "look up the docs, search for ‘date’" and presto badabingo. Thanks!

  13. Do any of you fellow nerds have a tool that parses (select) JS files for #JSDoc comments and spits out _something_ that can be used as-is or plugged into some kind of documentation template?

    This project I'm on has about a zillion (well documented!) functions and I'd love to be able to share them with new team members. Instead of saying "uuuh yeah we have a timezone-stripping date function _somewhere_…", it would just be like "look up the docs, search for ‘date’" and presto badabingo. Thanks!

  14. Документирование фронтенд-приложений: обзор JSDoc и Storybook

    В современной веб-разработке качественная документация так же важна, как и качественный код. Когда ваше приложение разрастается до десятков или сотен компонентов, функций и модулей, становится практически невозможно удерживать в памяти все детали их работы. Хорошая документация не только облегчает поддержку проекта в долгосрочной перспективе, но и значительно ускоряет вхождение новых разработчиков в команду. В этой статье мы рассмотрим два популярных подхода к документированию фронтенд-кода: JSDoc и Storybook. Они решают схожие задачи, но совершенно разными способами и с разным фокусом.

    habr.com/ru/articles/905996/

    #jsdoc #storybook #приложения #фронтент #документация

  15. #javascript #jsdoc #typescript

    Petite notation quand on veut typer un membre d'objet qui fait office de constructeur : ObjectConstructor<Object_Type>

    Exemple :

    interface TopBarApp {
    enable: () => void;
    disable: () => void;
    }

    type TopBarAppFactory = {
    klass: ObjectConstructor<TopBarApp>,
    }

    #dev #web

  16. #javascript #jsdoc #typescript

    Petite notation quand on veut typer un membre d'objet qui fait office de constructeur : ObjectConstructor<Object_Type>

    Exemple :

    interface TopBarApp {
    enable: () => void;
    disable: () => void;
    }

    type TopBarAppFactory = {
    klass: ObjectConstructor<TopBarApp>,
    }

    #dev #web

  17. it's one of those grim ironies in life that #JSDoc, the standard library/format for writing #javascript / #typescript documentation, has some of the worst documentation i've ever had the misfortune of trying to read.

    jsdoc.app/

  18. it's one of those grim ironies in life that #JSDoc, the standard library/format for writing #javascript / #typescript documentation, has some of the worst documentation i've ever had the misfortune of trying to read.

    jsdoc.app/

  19. While working on porting the Small Technology Foundation web site¹ to Kitten², I took the opportunity to pull out base Model and Collection classes that I’ll likely end up including in Kitten proper:

    • Model: codeberg.org/small-tech/site/s
    • Collection: codeberg.org/small-tech/site/s

    To see them in use, here’s the base Posts class (with RSS generation) that extends Collection:
    codeberg.org/small-tech/site/s

    And here’s the concrete EventPosts collection class that extends Posts:
    codeberg.org/small-tech/site/s

    And the EventPost (showing an implementation of a calculated property):
    codeberg.org/small-tech/site/s

    So all this is possible (persisting and reading back typed model collections, etc.) thanks to JSDB¹ (JavaScript database), a zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database I wrote for the Small Web that persists to a JavaScript transaction log and is included as as first-class citizen in Kitten.

    codeberg.org/small-tech/jsdb

    And if you want to know how the magic mapping of classes happens, see the Database App Module:

    codeberg.org/small-tech/site/s

    PS. For a much gentler introduction to persistence in Kitten, see the Kitten Persistence tutorial:
    kitten.small-web.org/tutorials

    Enjoy! :kitten:💕

    ¹ small-tech.org
    ² kitten.small-web.org

    #Kitten #SmallWeb #SmallTech #JavaScript #database #JSDB #typeSafety #JSDoc #closureCompiler #TypeScript #workInProgress

  20. While working on porting the Small Technology Foundation web site¹ to Kitten², I took the opportunity to pull out base Model and Collection classes that I’ll likely end up including in Kitten proper:

    • Model: codeberg.org/small-tech/site/s
    • Collection: codeberg.org/small-tech/site/s

    To see them in use, here’s the base Posts class (with RSS generation) that extends Collection:
    codeberg.org/small-tech/site/s

    And here’s the concrete EventPosts collection class that extends Posts:
    codeberg.org/small-tech/site/s

    And the EventPost (showing an implementation of a calculated property):
    codeberg.org/small-tech/site/s

    So all this is possible (persisting and reading back typed model collections, etc.) thanks to JSDB¹ (JavaScript database), a zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database I wrote for the Small Web that persists to a JavaScript transaction log and is included as as first-class citizen in Kitten.

    codeberg.org/small-tech/jsdb

    And if you want to know how the magic mapping of classes happens, see the Database App Module:

    codeberg.org/small-tech/site/s

    PS. For a much gentler introduction to persistence in Kitten, see the Kitten Persistence tutorial:
    kitten.small-web.org/tutorials

    Enjoy! :kitten:💕

    ¹ small-tech.org
    ² kitten.small-web.org

    #Kitten #SmallWeb #SmallTech #JavaScript #database #JSDB #typeSafety #JSDoc #closureCompiler #TypeScript #workInProgress

  21. Looking for advice on how to refactor legacy #JavaScript #frontend code (My expertise is on backend).

    I know how to write relatively clean JS / #TypeScript for frontend in modern setups with modern tooling, but I'm not sure how to proceed with thousands-of-lines long files that are directly included as they are, so I can transition to having smaller & cleaner files and using static analysis tools that give me some peace of mind.

    My only achievement so far with my current project is that I run #BiomeJS on some selected files.

    I'm relying on #JSDoc for now, but "for my eyes only", I'm not using this typing information to validate anything.

    #refactoring #legacycode

  22. Looking for advice on how to refactor legacy #JavaScript #frontend code (My expertise is on backend).

    I know how to write relatively clean JS / #TypeScript for frontend in modern setups with modern tooling, but I'm not sure how to proceed with thousands-of-lines long files that are directly included as they are, so I can transition to having smaller & cleaner files and using static analysis tools that give me some peace of mind.

    My only achievement so far with my current project is that I run #BiomeJS on some selected files.

    I'm relying on #JSDoc for now, but "for my eyes only", I'm not using this typing information to validate anything.

    #refactoring #legacycode

  23. I'm adding #JSDoc on a non-typescript old web app I have to maintain. It's better than nothing!

    #javacsript #typescript #webdev

  24. Je cherche en ce moment un outil de génération de #documentation #javascript .

    J'utilise #jsdoc <jsdoc.app/> depuis des années mais j'essaye de voir s'il n'existe pas autre chose de plus simple et léger (écrire un modèle pour jsdoc c'est vraiment un calvaire !)

    Je jette un œil du côté des #plugins de #vscode et les résultats de recherche sont maintenant pollué par tout un tas de conneries basées sur #ai .

    Ce métier est foutu !

  25. Je cherche en ce moment un outil de génération de #documentation #javascript .

    J'utilise #jsdoc <jsdoc.app/> depuis des années mais j'essaye de voir s'il n'existe pas autre chose de plus simple et léger (écrire un modèle pour jsdoc c'est vraiment un calvaire !)

    Je jette un œil du côté des #plugins de #vscode et les résultats de recherche sont maintenant pollué par tout un tas de conneries basées sur #ai .

    Ce métier est foutu !

  26. Trying to bring some type-checking to webc components in @eleventy via #jsdoc comments

  27. Trying to bring some type-checking to webc components in @eleventy via comments

  28. I looked for a #JavaScript framework that does not require a build step but still has good support for types with #JSDoc and has a functional API. The usual suspects, #Vue, #React and #lit do not fit this description.

    I came across this tiny framework that does. github.com/grucloud/bau?tab=re

  29. Almost another year has passed and it’s still not possible to use JSDoc and have the TypeScript LSP understand when you’re referring to a class and when you’re referring to an instance…

    *sigh*

    github.com/jsdoc/jsdoc/issues/

    #JSDoc #TypeScript #web #dev

  30. "Our approach to JSDoc has evolved since this issue was created. (...) #Typescript is the largest processor of #JSDoc at this point, and TS users who want typing are probably the most prolific authors of it."

    github.com/microsoft/TypeScrip

  31. Si vous voulez utiliser le typage de JSDoc parce que l'usage de TypeScript n'est pas possible dans votre situation.

    JSDoc as an alternative TypeScript syntax
    alexharri.com/blog/jsdoc-as-an

    #typescript #jsdoc

  32. If using Typescript means you want to write less Unit Tests then, actually, I'm all for it. Type away, with JSDoc comments.

    But I'm still making you write end-to-end functional browser tests.

    #typescript #unitTests #javaScript #types #typing #programming #webDev #jsdoc #jsdocs

  33. One thing that's cool when you use #JavaScript #JSDoc instead of #TypeScript is that you can safely use a beta version of TS in your project: this will have no impact on the JS bundle, only on type checking!

    (currently experimenting the new JSDoc type imports released with TS 5.5 Beta)