-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Many errors on JSDoc use entire tag as errorNode #41974
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
BTW: What's 'PursuitFellowship' meaning.... |
@Kingwl the TS team is running a workshop with the Pursuit Fellowship today, and we're going to work through the contribution process using this bug (among others). |
@sandersn Does this mean that issues labeled with "PursuitFellowship" should not be considered for external contributors? |
Yes, please, at least until tomorrow. But in general, they're simple issues that frequent contributors like you and @Kingwl should leave to new people. |
Previously, the error span was too large on @type errors on functions when the type was not a function. The span covered the entire tag. This PR changes the error node just to be the type of the type tag. In other words, the error span was previously this: ``` @type {IncorrectType} ``` But is now just this: ``` IncorrectType ``` Fixes the first error from #41974, but not the other two. Co-authored-by: Ashya Manning <[email protected]> Co-authored-by: Nilber Remon <[email protected]>
Has this been fixed? |
Previously, the error span was too large on @type errors on functions when the type was not a function. The span covered the entire tag. This PR changes the error node just to be the type of the type tag. In other words, the error span was previously this: ``` @type {IncorrectType} ``` But is now just this: ``` IncorrectType ``` Fixes the first error from #41974, but not the other two. Co-authored-by: Ashya Manning <[email protected]> Co-authored-by: Nilber Remon <[email protected]> Co-authored-by: Ashya Manning <[email protected]> Co-authored-by: Nilber Remon <[email protected]>
@DanielRosenwasser points out that the error message in the example is not very good, and should maybe have a related span:
@chenjigeng The first bad error span is fixed; the other two are not. |
Previously, the error span was too large on @type errors on functions when the type was not a function. The span covered the entire tag. This PR changes the error node just to be the type of the type tag. In other words, the error span was previously this: ``` @type {IncorrectType} ``` But is now just this: ``` IncorrectType ``` Fixes the first error from microsoft#41974, but not the other two. Co-authored-by: Ashya Manning <[email protected]> Co-authored-by: Nilber Remon <[email protected]> Co-authored-by: Ashya Manning <[email protected]> Co-authored-by: Nilber Remon <[email protected]>
The other baselines that still show errors are (at least):
|
This is made more obvious by #41877, which corrects the spans of tags to their full spans, making the error spans even more ungainly. Here's one example; see the errors.txt diffs in the linked PR for more.
Expected behavior:
Actual behavior:
The text was updated successfully, but these errors were encountered: