mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix: fix FlatList viewabilityConfig prop type (#37299)
Summary: FlatList `viewabilityConfig` prop seems no need to be any type. So I replaced it with `ViewabilityConfig` from `VirtualizedList.d.ts` ## Changelog: [GENERAL] [FIXED] - change FlatList `viewabilityConfig` prop type `any` to `ViewabilityConfig` Pull Request resolved: https://github.com/facebook/react-native/pull/37299 Test Plan: Ran yarn test-typescript and yarn test-typescript-offline with no errors. Reviewed By: jacdebug Differential Revision: D45689033 Pulled By: cipolleschi fbshipit-source-id: e7fd31c534c5f47321b36d0d764f466392ad897e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e540d05846
commit
5dfa38a20e
+2
-1
@@ -12,6 +12,7 @@ import type {
|
||||
ListRenderItem,
|
||||
ViewToken,
|
||||
VirtualizedListProps,
|
||||
ViewabilityConfig,
|
||||
} from '@react-native/virtualized-lists';
|
||||
import type {ScrollViewComponent} from '../Components/ScrollView/ScrollView';
|
||||
import type {StyleProp} from '../StyleSheet/StyleSheet';
|
||||
@@ -144,7 +145,7 @@ export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
|
||||
/**
|
||||
* See `ViewabilityHelper` for flow type and further documentation.
|
||||
*/
|
||||
viewabilityConfig?: any | undefined;
|
||||
viewabilityConfig?: ViewabilityConfig | undefined;
|
||||
|
||||
/**
|
||||
* Note: may have bugs (missing content) in some circumstances - use at your own risk.
|
||||
|
||||
Reference in New Issue
Block a user