-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FlatList item generic types (#5528)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary I think I ran into a typescript types regression, where the `Animated.FlatList` type was no longer generic. It always used the any type and I couldn't provide a custom item type myself anymore. I found it while upgrading from Reanimated v2 to v3. I think I managed to patch the generated .d.ts file properly locally and this is what did the trick for me. If this isn't matching your code style or requirements, I'm happy to work with you on making this work. <!-- Explain the motivation for this PR. Include "Fixes #<number>" if applicable. --> ## Test plan <!-- Provide a minimal but complete code snippet that can be used to test out this change along with instructions how to run it and a description of the expected behavior. --> Probably makes sense to see if it breaks anything in the example app but other than that 🤷 --------- Co-authored-by: Tomasz Żelawski <[email protected]>
- Loading branch information
1 parent
8a7c817
commit 9d365ae
Showing
2 changed files
with
65 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters