Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a rule to forbid types #134

Closed
j-f1 opened this issue Dec 15, 2018 · 1 comment · Fixed by #245
Closed

Add a rule to forbid types #134

j-f1 opened this issue Dec 15, 2018 · 1 comment · Fixed by #245

Comments

@j-f1
Copy link

j-f1 commented Dec 15, 2018

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
 */
function add(a: number, b: number) {
  return a + b
}

// Invalid
/**
 * Adds two numbers
 * @param {number} a The first number
error     ~~~~~~~~
 * @param {number} b The second number
error     ~~~~~~~~
 * @returns {number} The sum
error       ~~~~~~~~
 */
function add(a: number, b: number) {
  return a + b
}
@gajus
Copy link
Owner

gajus commented May 21, 2019

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants