-
Notifications
You must be signed in to change notification settings - Fork 38
Multiple definition of type name props when migriting to JSXv4 #654
Comments
Worth adding it into the spec doc. |
Looks good. What happens when the user's |
I don’t have a good solution for that, literally it is correct that the duplicated following one should |
Is it helpful semething like “… If it is inside of component, the type props could be defined already.”? What do you think? |
Are multiple locations, or hints, supported? Other languages often say "Previous definition was here:" |
It's technically possible to annotate the props type definition so that error messages can special case it. As for multiple locations, that's a separate question. How about create another issue. |
The comment deleted and relocated to rescript-lang/rescript#5695 |
rescript-lang/rescript#5695 for multiple locations issue |
The current PR seems a clear improvement, we can merge it. |
I had my own
type props = ...
(unrelated to React props, just using that name). Migrating to JSXv4 caused the following error:The error seems valid (I should rename my own type), but:
props
)The text was updated successfully, but these errors were encountered: