-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Report error for duplicate @type declaration in @typedef #17442
Comments
Hi @mhegazy can I try that one? |
@noamyogev84 Go for it! |
Thanks @sandersn. can you please share some code pointers? |
You'll want to start in while (child = tryParse(() => parseChildPropertyTag(indent))) {
// ...
if (child.kind === SyntaxKind.JSDocTypeTag) {
if (childTypeTag) {
break;
}
else {
childTypeTag = child;
}
}
// ...
} As you can see, in case of duplicate For adding tests, follow the directions in CONTRIBUTING, except that you should add your test in // @allowJS: true
// @checkJS: true
// @noEmit: true
// @Filename: bug17442.js
// ... actual test goes here ... @DanielRosenwasser any opinions on what the error message should be? |
Great I'm on it. |
Hi @sandersn, "Planting" an arbitrary syntax error in the above example does produce error, but I still can't figure out where it's being handled. Do you have any idea what's missing? |
@sandersn, @DanielRosenwasser |
Can I try this one? |
Bonus points on providing a related span on the first tag if it's not too hard:
|
@nisha-kaushik go for it. Not sure if @noamyogev84 is still looking at this but the issue they were running into might've just been running tests in a |
@nisha-kaushik go ahead. |
TypeScript Version: master
Code
Expected behavior:
Error.
Actual behavior:
No error.
The text was updated successfully, but these errors were encountered: