-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Help text in object-literal @property JSDoc missing from Intellisense when hovering over that property #33695
Copy link
Copy link
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: typescript@3.7.0-dev.20190928
Search Terms:
typescript jsdoc object property help text intellisense
Code
/**
* @typedef {Object} Works - This type shows property help
*/
interface Works {
/** This is property `a` */
a: number;
}
// If you hover over `a`, the JSDoc help text is shown
// (as expected) for that property.
const y: Works = { a: 1 };
/**
* @typedef {Object} Broken - Property help is missing
* @property {number} a - This help text never shows up
*/
interface Broken {
a: number;
}
// If you hover over `a`, the JSDoc help text is missing
const x: Broken = { a: 1 };Playground Link:
https://codesandbox.io/s/autumn-architecture-m084y
Related Issues:
- Object member type defined by JSDoc @property tags are not recoganized #9620 seems to claim that this problem was fixed by fix the issue that @property types are not recoganized #9621, but clearly it's not fully fixed.
- JSDoc documentation for interface members does not show in tooltips for properties on anonymous objects that are typed to those interfaces #18358 also seems to claim to have fixed this problem, but the "working" example shown uses the "per-property" help text (like
Worksin this task), not the help text in@propertytags.
I also found other issues which seemed related to class properties or destructured properties, but I'm assuming that this object-literal-properties issue may be different. Here's a few: #20894, #4261, #26611
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug

