-
Notifications
You must be signed in to change notification settings - Fork 12.8k
checkJs error for indirect JSDoc param tag #19268
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
Comments
Probably due to #18777. |
Any chance this will be fixed in TS 2.6? This is a big blocker for us upgrading to 2.6, as we use JSDoc in many places. As a workaround, I'm using |
Yeah, it's certainly #18777 -- the type is correct, it just issues a spurious error. |
Fix is up at #19355 |
@sandersn Thanks for getting this fixed so quickly! |
Hey! /**
* @param {Object} args
* @param {string} args.prop1
* @param {string} args.prop2
*/
function patate({ prop1, prop2 }) {
}
// JSDoc '@param' tag has name 'args', but there is no parameter with that name. The problem is the same using an enum syntax: /**
* @param {{prop1: string, prop2: string}} args
*/
function patate({ prop1, prop2 }) {
} Wouldn't it make sense not to raise this error in this case, but still be able to annotate the properties with the right types ? |
Sweet, thanks 👍 |
TypeScript Version: 2.6.0-dev.20171015
Expected: No error
Actual:
JSDoc '@param' tag has name 'wat', but there is no parameter with that name.
The text was updated successfully, but these errors were encountered: