Skip to content

Help text in object-literal @property JSDoc missing from Intellisense when hovering over that property #33695

@justingrant

Description

@justingrant

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 };

Expected behavior:
image

Actual behavior:
image

Playground Link:
https://codesandbox.io/s/autumn-architecture-m084y

https://www.typescriptlang.org/play/#code/PQKhFgCgAIWgBALgTwA4FMAm6Bm0DeA8gEYBW6AxogL7QDqA9gE4DWAztALTQAqAFgEsOKDNDZ8GAdw6omDDExTQ+6ADaoosYFAEA7ROiY4AhhXT1m7Apuig4-IdEez5hpQANj7rTeMAuaF0AVwBbYkMAbihqKGBgaABJPGQGIOUGADdDaEzsz3cAGmhEFWgAKQBlABEGCmU1VGL0AA9EJw5xKV1Y+IAKYw4WjCosAEpoHGZivmM2lwUUADooCgZdNjbkAMZWDgBeAmh-aABGaGooyFiwTTgkNCxcAhJyKloAITkWdF0uaAAFOQLZD1dTtaAhIRsPQAc1uCHmbhB+GCYUMtGMfwcHBUYIMrUC6CyTDEEmk0CCGhgIG0kD0BiMpnMnwY31++F8AVR4SYlxikDiiWSqXSxJyYvyRRK5kqNTquMa+LajkhbGhujhkFW6zazQCLLZ0AO+COATOFygUCAA

Related Issues:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions