tsdoc icon indicating copy to clipboard operation
tsdoc copied to clipboard

Support JSDoc "synonyms" for tags

Open rbuckton opened this issue 6 years ago • 4 comments

JSDoc supports synonyms for many tags, and it would be worthwhile to support those synonyms for code bases that were previously migrated from JavaScript to TypeScript without requiring an investment in time to rewrite doc comment tags to support TSDoc. For example:

  • @abstract (synonyms: @virtual)
  • @augments (synonyms: @extends)
  • @default (synonyms: @defaultvalue)
  • @description (synonyms: @desc)
  • @fires (synonyms: @emits)
  • @param (synonyms: @arg, @argument)
  • @returns (synonyms: @return)
  • @throws (synonyms: @exception)
  • @yields (synonyms: @yield)
  • {@link} (synonyms: {@linkcode}, {@linkplain})
  • etc.

It would also be valuable for type parameter support (#72), allowing @template as a synonym for @typeParam.

rbuckton avatar Dec 19 '19 01:12 rbuckton

I threw together a PR that adds support for synonyms.

rbuckton avatar Dec 19 '19 22:12 rbuckton

@template is supporting by vscode and jsdoc, tsdoc should support it

hosseinmd avatar Mar 04 '21 14:03 hosseinmd