Repository navigation
Go-to-definition in JSDoc tag followed by diagnostics request incorrectly creates new errors #50341
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
Activity
- changed the title
[-]Sequentially editing `@link` content, running go-to-definition, then diagnostics, incorrectly creates new errors[/-][+]Go-to-definition in `@link` tag followed by diagnostics request incorrectly creates new errors[/+]on Aug 17, 2022 DanielRosenwasser commented
on Aug 17, 2022 MemberAuthorMore actionsUnfortunately this isn't related to the
@linktag - I think it occurs in any JSDoc that might try to resolve./** * @param asd {[|UnresolvedTypeReference|]} */ function blah(asd) { }
If you do the same sort thing - run a semantic operation on
UnresolvedTypeReference, and then request errors - then you'll start seeing errors in the JSDoc, even in a.tsfile.Reacted by Nathan Shively-Sanders- changed the title
[-]Go-to-definition in `@link` tag followed by diagnostics request incorrectly creates new errors[/-][+]Go-to-definition in JSDoc tag followed by diagnostics request incorrectly creates new errors[/+]on Aug 17, 2022 DanielRosenwasser commented
on Aug 17, 2022 MemberAuthorMore actions#49109 seems strongly related.
DanielRosenwasser commented
on Oct 6, 2022 MemberAuthorMore actionsAnother
/** * @type {{ x: $ }} */
Type in
this[""]and you'll get the error:A 'this' type is available only in a non-static member of a class or interface.- addedRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
on Feb 1, 2023 - added a commit that references this issue
on May 8, 2023 - addedFix AvailableA PR has been opened for this issueA PR has been opened for this issue
on May 8, 2023 - locked as resolved and limited conversation to collaborators
on Oct 22, 2025
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone

Currently, this
.tsfile produces no errors.However, if you very-quickly replace
checkBarIswithcheckFooIsin the above example by double-clicking and pasting in the new text, then VS Code will sometimes then make adefinitionAndBoundSpanrequest. That request will get served, and then the editor will request errors. The errors returned then become nonsensical.Expected: No errors
Actual:
Here's a GIF of this in action
Here's a relevant fourslash test that currently fails.