Skip to content

Typecheck fails #192

@Baer05

Description

@Baer05

After upgrade react-native to version 0.78.0 i got this error when i run npm run typecheck:
node_modules/react-native-swiper-flatlist/src/components/SwiperFlatList/SwiperFlatList.tsx:238:7 - error TS2322: Type 'RefObject<FlatList | null>' is not assignable to type 'RefObject<FlatList>'.
Type 'FlatList | null' is not assignable to type 'FlatList'.
Type 'null' is not assignable to type 'FlatList'.

238 ref: flatListElement,
node_modules/react-native-swiper-flatlist/src/components/SwiperFlatList/SwiperFlatList.tsx:236:53
236 const flatListProps: FlatListProps & { ref: React.RefObject<RNFlatList> } = {
~~~
The expected type comes from property 'ref' which is declared here on type 'FlatListProps & { ref: RefObject<FlatList>; }'

Found 1 error in node_modules/react-native-swiper-flatlist/src/components/SwiperFlatList/SwiperFlatList.tsx:238

Can you help me how to fix this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions