jfilter / react-native-onboarding-swiper

🛳 Delightful onboarding for your React-Native app
https://www.npmjs.com/package/react-native-onboarding-swiper
Other
994 stars 180 forks source link

Typescript definitions for flatlistProps #113

Open zemiret opened 3 years ago

zemiret commented 3 years ago

Hi. I was trying to use flatlistProps to tweak some properties, but the typescript definition for the type is:

flatlistProps?: FlatListProps<Page> | undefined;

And FlatListProps type requires data and renderItem props. I believe the type should be wrapped so that these fields are not required. Technically I could provide data as I see that this is just pages, but renderItem is some private function and trying to supply it kind of defeats part of this library's purpose.

jfilter commented 2 years ago

Yes, the type definitions are not correct:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/37f3515e1ae1c7da70797750a8e31da21542f0dd/types/react-native-onboarding-swiper/index.d.ts#L157

If anybody wants to help, please sumit a PR to https://github.com/DefinitelyTyped/DefinitelyTyped.