microsoft/TypeScript

Organize Imports removes first `@deprecated` JSDoc comment

Shinigami92 opened this issue ยท 0 comments

Bug Report

๐Ÿ”Ž Search Terms

  • jsdoc
  • organize imports
  • exports
  • deprecated

๐Ÿ•— Version & Regression Information

  • This changed between versions 4.9.5 and 5.0

โฏ Playground Link

Playground link with relevant code

๐Ÿ’ป Code

export type {
  /** @deprecated Use LocationDefinitions instead */
  LocationDefinitions as AddressDefinitions,
  LocationDefinitions,
  /** @deprecated Use PersonDefinitions instead */
  PersonDefinitions as NameDefinitions,
  PersonDefinitions,
  /** @deprecated Use PersonTitleDefinitions instead */
  PersonTitleDefinitions as NameTitleDefinitions,
  PersonTitleDefinitions,
} from './definitions';
export type {
  /** @deprecated Use CssFunctionType instead */
  CssFunctionType as CSSFunction,
  CssFunctionType,
  /** @deprecated Use CssSpaceType instead */
  CssSpaceType as CSSSpace,
  CssSpaceType,
} from './modules/color';

๐Ÿ™ Actual behavior

The first JSDoc comment gets removed when executing Organize Imports

export type {
  LocationDefinitions as AddressDefinitions,
  LocationDefinitions,
  /** @deprecated Use PersonDefinitions instead */
  PersonDefinitions as NameDefinitions,
  PersonDefinitions,
  /** @deprecated Use PersonTitleDefinitions instead */
  PersonTitleDefinitions as NameTitleDefinitions,
  PersonTitleDefinitions,
} from './definitions';
export type {
  /** @deprecated Use CssFunctionType instead */
  CssFunctionType as CSSFunction,
  CssFunctionType,
  /** @deprecated Use CssSpaceType instead */
  CssSpaceType as CSSSpace,
  CssSpaceType,
} from './modules/color';

๐Ÿ™‚ Expected behavior

The comment should not get removed

export type {
  /** @deprecated Use LocationDefinitions instead */
  LocationDefinitions as AddressDefinitions,
  LocationDefinitions,
  /** @deprecated Use PersonDefinitions instead */
  PersonDefinitions as NameDefinitions,
  PersonDefinitions,
  /** @deprecated Use PersonTitleDefinitions instead */
  PersonTitleDefinitions as NameTitleDefinitions,
  PersonTitleDefinitions,
} from './definitions';
export type {
  /** @deprecated Use CssFunctionType instead */
  CssFunctionType as CSSFunction,
  CssFunctionType,
  /** @deprecated Use CssSpaceType instead */
  CssSpaceType as CSSSpace,
  CssSpaceType,
} from './modules/color';