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:
Sunny Luo
2018-12-12 16:41:59 +08:00
committed by Michał Osadnik
parent 74c520204f
commit 2eb45e2b47

View File

@@ -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>