Say I have these TS definitions:
export type SearchStackParamList = {
SearchScreen: undefined;
Restaurant: undefined;
};
export type SearchScreenProps = CompositeScreenProps<
NativeStackScreenProps<SearchStackParamList, 'SearchScreen'>,
CompositeScreenProps<
NativeStackScreenProps<SearchStackParamList>,
NativeStackScreenProps<RootStackParamList>
>
>;
export type RestaurantScreenProps = CompositeScreenProps<
NativeStackScreenProps<SearchStackParamList, 'Restaurant'>,
CompositeScreenProps<
NativeStackScreenProps<SearchStackParamList>,
NativeStackScreenProps<RootStackParamList>
>
>;
See how SearchScreenProps and RestaurantScreenProps are kinda redundant? Is there a way I can improve this so it's less verbose? Maybe through some kind of "extend" function?