Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork210
(feat) be able to type props/events/slots#437
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Through a new reserved interface "ComponentDef"
Maybe we can add a dummy helper function like |
Evertt commentedMar 16, 2021
Hey guys, any idea when this will be completed? 👼 |
This implementation will very likely not land in this form.This RFC is where the discussion is happening and the details are specified. After that the implementation will follow. |
Uh oh!
There was an error while loading.Please reload this page.
Through a new reserved interface
ComponentDef
See new tests for examples.
Generics
Problem to be solved: Generics. We cannot use
instanceOf(ComponentName)
anymore, because this way we cannot pass in the information about the type of the generic.If we have
Child:
Parent:
We need a transformation that makes sure that
iShouldBeOfTypeString
actually is inferred asstring
. My current idea is to transform this tonew Child({props: {...allPropsAndItsValuesThatAreDefinedOnTheChild}}).$on
instead of the oldinstanceOf(Child).$on
.A completely different idea is to somehow use Function Components instead of Class components. But I'm not sure if we can use this with all the other constraints we have.
Thoughts?