Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Typescript unexpected "?" when using listrenderItem with extends generic

$
0
0

Why I get this error at the end of my extends >= ({ item })

Error:

(alias) interface IShopsListDataFunctionimport IShopsListDataFunction'?' expected.ts(1005)

Code:

  const renderItem: ListRenderItem<IShopsListData extends IShopsListDataFunction> = ({ item }) => (<View></View>  )

If I remove the extends then it works but I need my IShopsListDataFunction


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>