Better JSX property error messages · Issue #23117 · microsoft/TypeScript (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@mhegazy

Description

@mhegazy

JSX component property errors are limited in nature. seems like there is one of three categories:

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'ortype of property 'y' does not match expected..

image

Related to #23116

Originally reported in https://twitter.com/keeskluskens/status/981168047204458501