#jsdoc — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #jsdoc, aggregated by home.social.
-
Maybe that's helpful for other devs using JSDoc: Import Types from other modules in JSDoc
https://grooovinger.com/notes/2026-02-12-import-types-from-other-modules
-
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.
https://multiline.co/mment/2024/02/importing-jsdoc-type-definitions/#typescript-5.5-or-newer
-
JSDocs в VSCode
Меня зовут Алекс Гусев. В этой публикации я очень кратко раскрываю, почему переход с IntelliJ IDEA (PhpStorm) на VSCode ломает привычную работу с JSDoc в JavaScript-проектах.
-
#Development #Approaches
The nuances of JavaScript typing · “JavaScript + JSDoc + tsc should be the industry default.” https://ilo.im/168va0_____
#EcmaScript #JavaScript #JSDoc #TypeScript #tsc #CLI #Tooling #WebDev #Frontend #Backend -
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. 🙄
https://culi.bearblog.dev/jsdoc-is-typescript/ #developer #humor #coding #humor #HackerNews #ngated -
The Nuances of JavaScript Typing Using JSDoc, by @jaredwhite (@vanillaweb):
-
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
-
JSDoc как идеальный инструмент типизации для JavaScript. Джаред Уайт утверждает, что JavaScript в сочетании с JSDoc и проверкой типов через TypeScript tsc обеспечивает ту же безопасность и ясность, что и TypeScript, но без лишней сборки. Он описывает настройку jsconfig.json и tsconfig.json и показывает, как JSDoc делает код самодокументируемым и гибким. #js #jsdoc
-
#Development #Introductions
The killer feature of web components · A look at the Custom Elements Manifest initiative https://ilo.im/167mgm_____
#WebComponents #TypeScript #JSDoc #JSON #API #WebDev #Frontend #HTML #CSS #JavaScript -
@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.
-
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!
-
Despite a few annoyances with JSDoc for adding types, I think it's great. The habit of adding comments and descriptions has proven to be incredibly useful.
I noticed that my CSS code isn't as nicely commented. Maybe I should give KSS another look?
#css #webdev #jsdoc #javascript -
Документирование фронтенд-приложений: обзор JSDoc и Storybook
В современной веб-разработке качественная документация так же важна, как и качественный код. Когда ваше приложение разрастается до десятков или сотен компонентов, функций и модулей, становится практически невозможно удерживать в памяти все детали их работы. Хорошая документация не только облегчает поддержку проекта в долгосрочной перспективе, но и значительно ускоряет вхождение новых разработчиков в команду. В этой статье мы рассмотрим два популярных подхода к документированию фронтенд-кода: JSDoc и Storybook. Они решают схожие задачи, но совершенно разными способами и с разным фокусом.
-
How JSDoc Saved My Dev Workflow, by (not on Mastodon or Bluesky):
https://spin.atomicobject.com/how-jsdoc-saved-my-dev-workflow/
-
#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>,
} -
I love that I can add CSS custom properties to a Custom Element Manifest via JSDoc. Let's see if I can add the idents/keys as specific properties to a JSX style attribute object. #css #jsdoc #cem #webcomponents
-
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.
-
JS-TS monster v2.0 👾
-
JS-TS monster v2.0 👾 #javascript #typescript #jsdoc
-
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: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Model.js
• Collection: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Collection.jsTo see them in use, here’s the base Posts class (with RSS generation) that extends Collection:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Posts.jsAnd here’s the concrete EventPosts collection class that extends Posts:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPosts.jsAnd the EventPost (showing an implementation of a calculated property):
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPost.jsSo 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.
https://codeberg.org/small-tech/jsdb
And if you want to know how the magic mapping of classes happens, see the Database App Module:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/database.js#L34
PS. For a much gentler introduction to persistence in Kitten, see the Kitten Persistence tutorial:
https://kitten.small-web.org/tutorials/persistence/Enjoy! :kitten:💕
¹ https://small-tech.org
² https://kitten.small-web.org#Kitten #SmallWeb #SmallTech #JavaScript #database #JSDB #typeSafety #JSDoc #closureCompiler #TypeScript #workInProgress
-
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.
-
I'm adding #JSDoc on a non-typescript old web app I have to maintain. It's better than nothing!
-
-
Je cherche en ce moment un outil de génération de #documentation #javascript .
J'utilise #jsdoc <https://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 !
-
-
#nusa devlog
Now I'm tempted to replace #Typescript because separating type annotation into .d.ts didn't works on `class`and `abstract class`. Even #JSDoc `/ @abstract */ class`didn't exist.
Thinking to replace it with #FlowType because it has sane comment-based type annotation. But hold on, does it support Ruby #RBS style for type annotation?
(I mean separation between file.js as implementation and file.d.ts as type annotation) -
#nusa devlog
Just finish replacing JSDoc with *.d.ts (inspired from Ruby #RBS) so I can debug it easily without too much distraction.
Somehow using either #JSDoc or #Typescript make it difficult to reason when fixing many regression I encounter 😵💫
-
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: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Model.js
• Collection: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Collection.jsTo see them in use, here’s the base Posts class (with RSS generation) that extends Collection:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Posts.jsAnd here’s the concrete EventPosts collection class that extends Posts:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPosts.jsAnd the EventPost (showing an implementation of a calculated property):
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPost.jsSo 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.
https://codeberg.org/small-tech/jsdb
And if you want to know how the magic mapping of classes happens, see the Database App Module:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/database.js#L34
PS. For a much gentler introduction to persistence in Kitten, see the Kitten Persistence tutorial:
https://kitten.small-web.org/tutorials/persistence/Enjoy! :kitten:💕
¹ https://small-tech.org
² https://kitten.small-web.org#Kitten #SmallWeb #SmallTech #JavaScript #database #JSDB #typeSafety #JSDoc #closureCompiler #TypeScript #workInProgress
-
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: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Model.js
• Collection: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Collection.jsTo see them in use, here’s the base Posts class (with RSS generation) that extends Collection:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Posts.jsAnd here’s the concrete EventPosts collection class that extends Posts:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPosts.jsAnd the EventPost (showing an implementation of a calculated property):
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPost.jsSo 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.
https://codeberg.org/small-tech/jsdb
And if you want to know how the magic mapping of classes happens, see the Database App Module:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/database.js#L34
PS. For a much gentler introduction to persistence in Kitten, see the Kitten Persistence tutorial:
https://kitten.small-web.org/tutorials/persistence/Enjoy! :kitten:💕
¹ https://small-tech.org
² https://kitten.small-web.org#Kitten #SmallWeb #SmallTech #JavaScript #database #JSDB #typeSafety #JSDoc #closureCompiler #TypeScript #workInProgress
-
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: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Model.js
• Collection: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Collection.jsTo see them in use, here’s the base Posts class (with RSS generation) that extends Collection:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Posts.jsAnd here’s the concrete EventPosts collection class that extends Posts:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPosts.jsAnd the EventPost (showing an implementation of a calculated property):
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPost.jsSo 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.
https://codeberg.org/small-tech/jsdb
And if you want to know how the magic mapping of classes happens, see the Database App Module:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/database.js#L34
PS. For a much gentler introduction to persistence in Kitten, see the Kitten Persistence tutorial:
https://kitten.small-web.org/tutorials/persistence/Enjoy! :kitten:💕
¹ https://small-tech.org
² https://kitten.small-web.org#Kitten #SmallWeb #SmallTech #JavaScript #database #JSDB #typeSafety #JSDoc #closureCompiler #TypeScript #workInProgress
-
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: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Model.js
• Collection: https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Collection.jsTo see them in use, here’s the base Posts class (with RSS generation) that extends Collection:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/Posts.jsAnd here’s the concrete EventPosts collection class that extends Posts:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPosts.jsAnd the EventPost (showing an implementation of a calculated property):
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/EventPost.jsSo 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.
https://codeberg.org/small-tech/jsdb
And if you want to know how the magic mapping of classes happens, see the Database App Module:
https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/database.js#L34
PS. For a much gentler introduction to persistence in Kitten, see the Kitten Persistence tutorial:
https://kitten.small-web.org/tutorials/persistence/Enjoy! :kitten:💕
¹ https://small-tech.org
² https://kitten.small-web.org#Kitten #SmallWeb #SmallTech #JavaScript #database #JSDB #typeSafety #JSDoc #closureCompiler #TypeScript #workInProgress
-
More adventures in using #jsdoc with #litelement:
The LitElement superclass generates reactive properties at runtime based on a static object in the subclass. Type systems don't like this--the types don't show up on the superclass because they're generated, and they don't show up on the base class because `ChildClass.properties.property` is not the same thing as `new ChildClass().property`
-
#shoelace is really making it comfy to create the new UI for #WebComponentDevTools
If only I could work on it full time for even a week, would finish to much quicker. So much code to refactor, re-build and improve.
I'll try to ship v0.3 by the end of year!
-
@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.
-
@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.
-
@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.
-
@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.
-
Как мы уменьшили количество кода для генерации графиков в 10 раз, сделав Vue-компонент
Рассказываем, как мы сделали универсальный компонент вместо копирования кода и многократно упростили жизнь разработчикам. Читать статью →
https://habr.com/ru/articles/830608/
#Vue3 #TypeScrypt #Highcharts #JSDoc #графики #графики_и_диаграммы
-
so I built a plugin for #TypeDoc that contains some functionality like “automatic @inheritDoc”, where if you neglect to document T, and T overrides/implements U, the result will copy the documentation from U into T when rendered. would anyone find this useful? if so I may release it standalone. #TypeScript #JSDoc
-
Recently I've seen a lot of people in the #JavaScript community advocating for #JSDoc as a "replacement" of some sort for #TypeScript. As an outsider (even tho I work with #NodeJS full-time now) I cannot shake the feeling of déjà vu.
Before #PHP 7 most developers used #PHPDoc to document input and output too, and though it was better than nothing, it was ugly (IMO) and ultimately impractical.
The solution is right there, I bet some can even smell it...
-
Phone reminded that I was at React Finland presenting exactly one year ago.
Currently on my way to WordCamp Finland to present on a similiar subject #usetheplatform
-
Can't believe I'm about to share #typescript content, but version 5.0 adds support for @satisfies and @overload to #JSDoc and that's p cool 👍
#Overload let's you type functions that can take different arguments which seems bad but w/e https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#overload-support-in-jsdoc
#Satisfies is some TS bullshit I haven't figured out yet but which is probably useful sometimes https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#satisfies-support-in-jsdoc
I just like to see parity with JSDocs and TS Syntax!
-
#nusa devlog
Now I'm tempted to replace #Typescript because separating type annotation into .d.ts didn't works on `class`and `abstract class`. Even #JSDoc `/ @abstract */ class`didn't exist.
Thinking to replace it with #FlowType because it has sane comment-based type annotation. But hold on, does it support Ruby #RBS style for type annotation?
(I mean separation between file.js as implementation and file.d.ts as type annotation) -
#nusa devlog
Now I'm tempted to replace #Typescript because separating type annotation into .d.ts didn't works on `class`and `abstract class`. Even #JSDoc `/ @abstract */ class`didn't exist.
Thinking to replace it with #FlowType because it has sane comment-based type annotation. But hold on, does it support Ruby #RBS style for type annotation?
(I mean separation between file.js as implementation and file.d.ts as type annotation) -
#nusa devlog
Now I'm tempted to replace #Typescript because separating type annotation into .d.ts didn't works on `class`and `abstract class`. Even #JSDoc `/ @abstract */ class`didn't exist.
Thinking to replace it with #FlowType because it has sane comment-based type annotation. But hold on, does it support Ruby #RBS style for type annotation?
(I mean separation between file.js as implementation and file.d.ts as type annotation) -
#nusa devlog
Now I'm tempted to replace #Typescript because separating type annotation into .d.ts didn't works on `class`and `abstract class`. Even #JSDoc `/ @abstract */ class`didn't exist.
Thinking to replace it with #FlowType because it has sane comment-based type annotation. But hold on, does it support Ruby #RBS style for type annotation?
(I mean separation between file.js as implementation and file.d.ts as type annotation) -
Can't believe I'm about to share #typescript content, but version 5.0 adds support for @satisfies and @overload to #JSDoc and that's p cool 👍
#Overload let's you type functions that can take different arguments which seems bad but w/e https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#overload-support-in-jsdoc
#Satisfies is some TS bullshit I haven't figured out yet but which is probably useful sometimes https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#satisfies-support-in-jsdoc
I just like to see parity with JSDocs and TS Syntax!
-
Can't believe I'm about to share #typescript content, but version 5.0 adds support for @satisfies and @overload to #JSDoc and that's p cool 👍
#Overload let's you type functions that can take different arguments which seems bad but w/e https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#overload-support-in-jsdoc
#Satisfies is some TS bullshit I haven't figured out yet but which is probably useful sometimes https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#satisfies-support-in-jsdoc
I just like to see parity with JSDocs and TS Syntax!
-
Can't believe I'm about to share #typescript content, but version 5.0 adds support for @satisfies and @overload to #JSDoc and that's p cool 👍
#Overload let's you type functions that can take different arguments which seems bad but w/e https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#overload-support-in-jsdoc
#Satisfies is some TS bullshit I haven't figured out yet but which is probably useful sometimes https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#satisfies-support-in-jsdoc
I just like to see parity with JSDocs and TS Syntax!