Better JSX property error messages · Issue #23117 · microsoft/TypeScript (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
JSX component property errors are limited in nature. seems like there is one of three categories:
- missing required property
- wrong property type
- additional unknown property
Currently we rely on the assignablity error message which a. includes information about intrinsic types, react types, etc.. and b. does not pin point the offending property.
We can do better by reporting the errors on the specific property in cases of failed assignablity, and be more explicit about what it is that the user is doing wrong.. e.g. "Missed required property 'x'or
type of property 'y' does not match expected..
Related to #23116
Originally reported in https://twitter.com/keeskluskens/status/981168047204458501