#Any way to inherit type docs on properties?

9 messages · Page 1 of 1 (latest)

shy lily
#

I'm looking to see if there are any tags I can add onto a property so that it can inherit the documentation from the type the property is typed as.

#

E.g. I'm looking for something that would end up looking similar to this without having to annotate the type itself

summer glade
#

you can do @link

#

oh you meant automatically?

shy lily
#

I'm not sure where the play ground link went but here it is again to give slightly more context

brittle socketBOT
#
claudekennilol#0

Preview:```ts
/**

  • Null value means no image
  • Empty string means upload in progress
  • Truthy value is the url
    */
    type Images = Record<string, string>;

/** Another random description */
type Resource = {};

export type Foo = {
/** @inheritdoc doesn't pull the Images type description */
...```

shy lily
#

The goal is to be able to hover over Foo and have it show the "nested" jsdoc documentation

summer glade
#

that may be something you have to see with your code editor honestly