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
TypeScript uses JSDoc for documentation purposes, but since it already has a type system, the type declarations are not useful and can be inferred from the source code. Could there be a rule, perhaps jsdoc/no-types, that prohibits any specification of types in the comment?
// Valid/** * Adds two numbers * @param a The first number * @param b The second number * @returns The sum */functionadd(a: number,b: number){returna+b}// Invalid/** * Adds two numbers * @param {number} a The first numbererror ~~~~~~~~ * @param {number} b The second numbererror ~~~~~~~~ * @returns {number} The sumerror ~~~~~~~~ */functionadd(a: number,b: number){returna+b}
The text was updated successfully, but these errors were encountered:
TypeScript uses JSDoc for documentation purposes, but since it already has a type system, the type declarations are not useful and can be inferred from the source code. Could there be a rule, perhaps
jsdoc/no-types
, that prohibits any specification of types in the comment?The text was updated successfully, but these errors were encountered: