Open ajafff opened 6 years ago
JSDocParameterTag, maybe also JSDocTypeTag and JSDocPropertyTag, where name is a QualifiedName is redundant in typescript:
/**
* @param {object} param description <-- only type is redundant
* @param {string} param.prop other description<-- redundant in typescript
*/
function foo(param) {
param.prop
}
Another redundant use of JSDoc in TypeScript is the type assertion syntax:
var numberOrString = Math.random() < 0.5 ? "hello" : 100;
var typeAssertedNumber = /** @type {number} */ (numberOrString)
Basically every JSDoc tag in a comment on a ParenthesizedExpression is redundant
In addition all JSDoc on EndOfFileToken is useless.
JSDoc in TypeScript is primarily used for documentation. Type annotations in JSDoc tags are ignored.
@function
,@class
, ... are always redundant@template
,@param
,@return
should not contain a type annotation and are only useful if there is some descriptionTODO: identify more useless tags
This is basically the same as TSLint's
no-redundant-jsdoc