-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Fix useAnimatedSensor
return type
#3094
Conversation
@@ -501,10 +501,19 @@ declare module 'react-native-reanimated' { | |||
interval: number; | |||
}; | |||
|
|||
export type AnimatedSensor = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason it's using a type
rather than an interface
?
react-native-reanimated.d.ts
Outdated
sensor: SensorValue3D | SensorValueRotation | null; | ||
unregister: () => void; | ||
isAvailable: boolean; | ||
config: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be using the type defined above
config: { | |
config: SensorConfig |
@jeremybarbet I used exactly the same type decl as the internal file already uses. Ideally we want to keep both the same or have a single source of truth for it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the help Marc ❤️
It returns
any
now.