-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typing problem with new native props + plugins #631
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A user created a plugin with name
x
that takes anumber
:We introduce a new native prop with name
x
that takes astring
With a runtime bailout check we can prevent errors and add a warning that their plugin now conflicts with a native prop (I expect this to be very rare):
But for types, there is a problem. If they weren't typing their plugin prop, they will now get an error since
Props
now hasx
types asstring
, but they are passing innumber
.Is it fine that types can suddenly emit errors/warnings upon minor updates? Or do we need to remove
[key: string]: any
and force strict types (which will still emit errors if they weren't strict typing their plugin prop, but only for that release, not future ones that introduce new props)?Looking at the DefinitelyTyped repo, changes in types happen frequently for correctness between minors and aren't considered breaking changes. Even TS itself introduces breaking in minors.
/cc @KubaJastrz
The text was updated successfully, but these errors were encountered: