Adding documentation comments to the return values of destructuring syntax #60759
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Type: Feature Request
In ReactJS, we often write code similar to
const [stateX, setStateX] = useState({ ... });
.I would like to hover over the variable name
stateX
with the mouse in other places where this variable is used to get an explanation similar to JSDoc (not for type, but to more clearly annotate the purpose of the variable).The reason I think this way is because the following approach often works:
(When I hover over the
refX
variable in other places where it is accessed, the tooltip can display the documentation "It's a ref for X".)VS Code version: Code 1.95.3 (Universal) (f1a4fb101478ce6ec82fe9627c43efbf9e98c813, 2024-11-13T14:50:04.152Z)
OS version: Darwin arm64 22.3.0
Modes:
The text was updated successfully, but these errors were encountered: