-
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
type error when using transition prop with expo 51 and reanimated 3.10 #343
Comments
Getting the same issue when trying to get ahead of migration to Expo 51 "moti": "^0.28.1", |
I'm able to get around the issue by changing to
But its a bit tedious with multiple properties |
Fixed #345 |
Releasing shortly |
@alantoa looks like some people are still getting this on SDK 51, interesting |
Hey @agallio, actually it works for me. |
Also, Can you please show me the type error in your code? (Hover over the error and take a screenshot of the error text.) @agallio |
Hi @alantoa, thank you for the response. It's working now, I think it was because of my faulty |
Got it, that's great! |
Facing this issue with expo SDK 50. moti version 0.29 |
You'll need to upgrade RN. The type issue is due to a typo in a react native type. The typo was fixed in RN 0.74 |
@nandorojo I'm using RN 0.74.3 and still see this issue |
please make sure you don't have types/react-native installed |
@nandorojo I've uninstalled |
I have the same issue.
|
You need moti v0.29. Try
|
@markmccoid Still have the error after updating to 0.29, event with restarting ts server |
Will check on a fix soon, thanks for reporting |
I think it’s actually due to how newer TS versions resolve declaration file |
Also getting this issue
|
This issue occurs due to the type intersection that's being created over multiple definitions of the I'm getting this issue when using I'm sure this will be an issue with other libraries as well. My suggestion would be to explicitly specify the prop type as |
A patch to this function might work: const Motified = forwardRef<
Ref,
// Props &
Omit<Props, keyof MotiProps> &
AnimatedProps<Props> &
MotiProps<Animate> & {
children?: React.ReactNode
}
>( |
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
Type '{ duration: number; }' is not assignable to type 'MotiTransitionProp<StyleValueWithReplacedTransforms<ViewStyle | TextStyle | ImageStyle>> | ((custom?: any) => MotiTransition<...>) | undefined'.
Type '{ type: "timing"; duration: number; }' is not assignable to type 'MotiTransitionProp<StyleValueWithReplacedTransforms<ViewStyle | TextStyle | ImageStyle>> | undefined'.
Type '{ type: "timing"; duration: number; delay: number; }' is not assignable to type 'MotiTransitionProp<StyleValueWithReplacedTransforms<ViewStyle | TextStyle | ImageStyle>> | undefined'.
Expected Behavior
No response
Steps To Reproduce
Heres some examples that give me a type error
Versions
Screenshots
Reproduction
https://github.com/dannyhw/moti-types-repro
Run
The text was updated successfully, but these errors were encountered: