Skip to content

Commit

Permalink
fixed EventArgFunc typings (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
iyegoroff authored and osdnk committed Oct 21, 2019
1 parent 825ea8f commit 775cace
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react-native-reanimated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ declare module 'react-native-reanimated' {
export function clockRunning(clock: AnimatedClock): AnimatedNode<0 | 1>;
// the return type for `event` is a lie, but it's the same lie that
// react-native makes within Animated
type EventArgFunc<T> = (arg: T) => Node<number>;
type EventArgFunc<T> = (arg: T) => AnimatedNode<number>;
type EventMapping<T> = T extends object ? { [K in keyof T]?: EventMapping<T[K]> | EventArgFunc<T[K]> } : Adaptable<T> | EventArgFunc<T>;
type EventMappingArray<T> = T extends Array<any> ? { [I in keyof T]: EventMapping<T[I]> } : [EventMapping<T>]
export function event<T>(
Expand Down

0 comments on commit 775cace

Please sign in to comment.