JSDoc support for destructured parameters
See original GitHub issueTypeScript Version: 2.0.3
Code
interface Foo {
/**
* A bar value
*/
bar?: string;
}
/**
* A function
*
* @param foo A param
* @param { bar } Another param
* @param bar Another param
*/
function foo(foo: string, { bar }: Foo): void {
bar;
foo;
}
foo('bar', { bar: 'play' });
Expected behavior:
Intellisense for the second argument, or the second argument properties.
Actual behavior:
No way of providing a description for the destructured elements of a destructured parameter.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:35
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Document destructured function parameter in JSDoc
In WebStorm I have found that if I just describe the (after-destructuring) parameters and ignore the destructuring it mostly works except for ...
Read more >Use JSDoc: @param
Documenting a destructuring parameter /** * Assign the project to an employee. * @param {Object} employee - The employee who is responsible for...
Read more >JSDoc for destructured parameters generated incorrectly, like ...
For destructured parameters, WebStorm generates JSDoc that looks exactly like that for positional parameters: /** <-- press Ctrl+Enter here function foo({ a ...
Read more >Joshua's Docs - JSDoc Cheatsheet and Type Safety Tricks
Type Guards; Annotating destructured parameters ... Repo: Types in JS, GitHub repo for discussing or getting help with JSDoc ...
Read more >Destructured function parameters and code maintainability
... and how destructured function parameters could help us. ... We are documenting our functions with JSDoc, which will also help us see ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This does not work on version 1.21.1
Also an issue when functions return an interface