-
Notifications
You must be signed in to change notification settings - Fork 133
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
fix motify()
type definition conflict for transition
prop
#369
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This should also solve #343 |
Looks reasonable, I assume this fixed it for you? |
It does sometimes but I keep running into a TypeScript limitation I'm not sure what the best approach to resolving performance issues is. |
What if you just manually omit transition? |
It still causes the type to blow up in complexity. I can't say for sure, but I think using |
In my experience that wouldn't quite be what causes it to blow up, more likely the depth of transition...for example if we removed the generic on the transition prop I wonder what would happen |
Also is this the latest TS version |
Thanks for digging in btw |
I'm not on the latest TypeScript but on a pretty late version |
I think the problem originates from newer Wrapping other dependencies and their types can be tough... |
When I have time, I'd be happy to explore this more. |
Moti takes over the
transition
prop to define transition configs, but this might conflict with existingtransition
props on the original component.While the implementation simply ignores passing
transition
to the original component, the type definition tries to merge the type declaration for both props, which sometimes results in impossible type intersections.This change removes that possibility by omitting any
keyof MotiProps
from the component's original prop definition.