storybookjs/storybook

[Bug]: JsDocs @deprecated tag does not show description

Open

#26,171 opened on Feb 23, 2024

View on GitHub
 (0 comments) (2 reactions) (0 assignees)TypeScript (10,058 forks)batch import
angularbughas workaroundhelp wantedsev:S3

Repository metrics

Stars
 (89,909 stars)
PR merge metrics
 (Avg merge 7d 22h) (184 merged PRs in 30d)

Description

Discussed in https://github.com/storybookjs/storybook/discussions/26154

Originally posted by miszol1 February 13, 2024

Describe the bug

When @ deprecated tag is used to describe input property, description is not displayed in Docs tab. image image

To Reproduce

https://stackblitz.com/edit/github-6gtqqv?file=src%2Fstories%2Fbutton.component.ts

System

Storybook Environment Info:

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm <----- active
    pnpm: 8.14.0 - /usr/local/bin/pnpm

Additional context

Workaround: put the description before the @deprecated line, it shows up in docs.

  /**
   * Is this the principal call to action on the page?
   * @deprecated qwe
   */
  @Input()
  primary = false;

Contributor guide