microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.74k stars 131 forks source link

Support JSDoc "synonyms" for tags #203

Open rbuckton opened 4 years ago

rbuckton commented 4 years ago

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:

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

rbuckton commented 4 years ago

I threw together a PR that adds support for synonyms.

hosseinmd commented 3 years ago

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

markus-incisive commented 3 weeks ago

Any updates? I'd like to see support for {@linkcode} and {@linkplain} specifically, since these do have slightly different behavior from {@link} and are supported in VSCode.

armamini commented 3 weeks ago

Adding synonyms to TSDoc would make JS-to-TS transitions smoother by preserving familiar JSDoc tags, reducing refactoring effort, and improving compatibility without losing any of TypeScript’s strengths.