the code below shows one of my screens and I need to get the title from params. But Eslint and typescript complains.
<Stack.Screen name="MarketAssetDetailsPage" options={({ route }) => ({ title: `${route.params?.routeName} Market Details`, headerStyle: { backgroundColor: route.params?.data.assetColor, }, headerBackTitleVisible: false, })} component={MarketAssetDetailsPage} />
I know we can use RouteProp in components but it doesn't work here. How do I define the types of route (which destructred from options) so it doesn't complain?