mirror of
https://github.com/zhigang1992/react-native-reanimated.git
synced 2026-01-12 17:42:44 +08:00
Update react-native-reanimated.d.ts (#146)
Fix Mapping declaration since [native event can be a function](https://github.com/kmagiera/react-native-reanimated/pull/83) Otherwise, you will get an error like this: "Type '{ nativeEvent: ({ translationY: y, state }: { translationY: number; state: State; }) => AnimatedNode<number>; }' is not assignable to type 'Mapping'.
This commit is contained in:
committed by
Michał Osadnik
parent
74c520204f
commit
2eb45e2b47
2
react-native-reanimated.d.ts
vendored
2
react-native-reanimated.d.ts
vendored
@@ -54,7 +54,7 @@ declare module 'react-native-reanimated' {
|
||||
interpolate(config: InterpolationConfig): AnimatedNode<number>;
|
||||
}
|
||||
|
||||
export type Mapping = { [key: string]: Mapping } | AnimatedValue<any>;
|
||||
export type Mapping = { [key: string]: Mapping } | Adaptable<any>;
|
||||
export type Adaptable<T> =
|
||||
| T
|
||||
| AnimatedNode<T>
|
||||
|
||||
Reference in New Issue
Block a user