-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Related Error SpansSpecifying regions for error messages/diagnostics on multiple locations.Specifying regions for error messages/diagnostics on multiple locations.FixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Now that we support multiple related spans for errors (#10489, #22789, #24548), we'd like to improve an existing error message.
Currently, we provide an error when accessing declarations that have been misspelled.
Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?
Cannot find name '{0}'. Did you mean '{1}'?
Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?
Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?
Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?
Module '{0}' has no exported member '{1}'. Did you mean '{2}'?
We can add a related span on the declaration of the suggestion if one exists:
It's likely that you meant to reference '{0}'.
This can help users quickly glance at the original declaration.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Related Error SpansSpecifying regions for error messages/diagnostics on multiple locations.Specifying regions for error messages/diagnostics on multiple locations.FixedA PR has been merged for this issueA PR has been merged for this issue