You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSDoc includes a @type tag, which can be used to assign a type to a variable. However, this is commonly confused with the @typedef tag, which is used to define a type.
In TypeScript, neither of these tags are necessary to document a type or interface; the JSDoc integration in VSCode (or one's editor of choice) is perfectly able to read a doc block placed above such a definition.
It would be great if we could write a lint rule which would verify that @type or @typedef is not present in a doc block for a type or interface and remove it automatically.
The text was updated successfully, but these errors were encountered:
mcmire
changed the title
(TypeScript) Detect incorrect usages of @type in TSDoc blocks
(TypeScript) Detect incorrect usages of @type in doc blocks
May 25, 2023
JSDoc includes a
@type
tag, which can be used to assign a type to a variable. However, this is commonly confused with the@typedef
tag, which is used to define a type.In TypeScript, neither of these tags are necessary to document a type or interface; the JSDoc integration in VSCode (or one's editor of choice) is perfectly able to read a doc block placed above such a definition.
It would be great if we could write a lint rule which would verify that
@type
or@typedef
is not present in a doc block for a type or interface and remove it automatically.The text was updated successfully, but these errors were encountered: