-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
Domain: Related Error SpansSpecifying regions for error messages/diagnostics on multiple locations.Specifying regions for error messages/diagnostics on multiple locations.Experience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript
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 certain errors for when a derived type incorrectly overrides/implements a member from the base type:
Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.
Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.
Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.
Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.
Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'.
We can actually provide the base type's member as a related span location for some extra context.
'{0}' redefines '{1}' in an incompatible way.
Where
0
is the derived type1
is the member name
and this gets reported on the base type member.
Metadata
Metadata
Assignees
Labels
Domain: Related Error SpansSpecifying regions for error messages/diagnostics on multiple locations.Specifying regions for error messages/diagnostics on multiple locations.Experience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsHelp WantedYou can do thisYou can do thisSuggestionAn idea for TypeScriptAn idea for TypeScript