Skip to content
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

Typing issue on innerRef #52

Open
alexstrat opened this issue Oct 8, 2020 · 0 comments
Open

Typing issue on innerRef #52

alexstrat opened this issue Oct 8, 2020 · 0 comments

Comments

@alexstrat
Copy link

alexstrat commented Oct 8, 2020

innerRef prop actually gets a an AnimatedComponent<FlatList | ScrollView | SectionList> rather than just a FlatList | ScrollView | SectionList (the type AnimatedComponent<T> does not exist in reanimated though).

We should do something like this:

class AnimatedFlatList extends Component<AnimateProps<FlatListStyle, FlatListProps>> {
  getNode(): ReactNativeView;
}

// same for AnimatedScrollView and AnimatedSectionList

type Props = {
  ...,
  innerRef: RefObject<AnimatedFlatList | AnimatedScrollView | AnimatedSectionList>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant