1,782 questions
0
votes
0
answers
43
views
How does the GJS documentation pipeline work with DevDocs?
I’ve noticed that GJS documentation uses DevDocs.
I’m trying to understand the documentation pipeline for GJS:
Does it read comments from the source code and generate documentation automatically?
Do ...
1
vote
1
answer
98
views
Is there a way for JSDoc comments to be visible in HTML files?
I'm not sure how to get the code snippet for this question as I don't know how to specify the filename of the JavaScript file, but here goes.
I have a JavaScript file, "scripts.js" that ...
0
votes
0
answers
75
views
Why does TS remove JSDoc when creating type declaration file from JS file?
When I create a type declaration file (.d.ts) from a TypeScript file that includes JSDoc, the final type declaration file still contains the JSDoc. This is helpful, because the user of the package not ...
1
vote
0
answers
98
views
VSCode only checks JSDoc in files that are currently open. How do I make it check the entire project?
Currently, VSCode only recognizes JSDoc @typedef declarations in files that are open.
For example, if I have a @typedef comment in a file that is NOT currently open in VSCode, VSCode thinks the type ...
1
vote
1
answer
95
views
How to type destructured rest params with JSDoc for use with TypeScript?
I have a React component that takes props a, b, and any other arbitrary value the user wants to add on top:
/**
* @param {object} props
* @param {string} props.a
* @param {number} props.b
*/
...
1
vote
2
answers
84
views
React.memo() prevents jsdoc description to show up in vscode, is there a work around?
When exporting my component like this
export default React.memo(MyComponent);
and using it somewhere else like this
<MyComponent></MyComponent>
it will not show the jsdoc documentation of ...
2
votes
0
answers
134
views
How would you use JSDoc for VSCode intellisense on an extended class method
I'm working on a library, and would like some functionality that requires users (meaning the user of the library) to extend a class. On that class will be a method that the user should override, and ...
1
vote
1
answer
65
views
Optional class property for object
I want to be able to define objects as:
/**@type{CheckData}**/
object1 = {check:true}
/**@type{CheckData}**/
object2 = {check:false, data: 'Why?'}
While I can use this @typedef with success:
/**
* @...
0
votes
0
answers
24
views
How to type static getters in abstract classes in javascript using jsdoc
I've got a base class with some static getters that need to be overwritten by the inheriting classes.
class BaseClass {
/**
* @abstract
* @returns {string}
*/
static get prefix()...
0
votes
1
answer
127
views
How to get JSDOC to work with Vite alias?
Working with React 17 & Vite v5 & VS Code IDE
We want to use alias when importing components for ease of use. But when we use it, the jsDoc popup doesn't show any data.
How to configure jsDoc ...
0
votes
1
answer
47
views
Can @typedef describe objects partially
I have a message object that can have all kinds of keys, some of which I know, some of them I can't know.
// @ts-check
/**
* @typedef {Object} Message
* @property {String} sender
* @property {...
0
votes
2
answers
101
views
JSDoc with recursive type and autocomplete in VS Code
In VS Code, in the first case, the intellisense is showing the bar key. But in the second case when I add a second key foo which is recursive, it breaks the intellisense at any level.
1st case:
2nd ...
1
vote
0
answers
65
views
Inheriting constructor documentation in JSDoc with ES6 classes
I am writing documentation for some classes written using the ES6 class syntax. I have some classes which inherit their constructor from their parent class, as below:
/**
* @class
*/
class Parent {
...
0
votes
1
answer
82
views
How do you add a /** */ description to (method) function's (JavaScript)
This is my code:
/**
* Completely clears out all items from an Array
* and returns the new length
*
* (Optional) fills this emptyied array with any given arguments
*
* @param {...any} Items ...
0
votes
0
answers
81
views
How do I add a link to my JSDoc in deno that links to my unit tests
Using the following version of Deno on Windows 11
$ deno --version
deno 2.2.6 (stable, release, x86_64-pc-windows-msvc)
v8 13.5.212.4-rusty
typescript 5.7.3
I would like my documentation for a ...