mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-12 22:51:18 +08:00
feat: add a CompositeScreenProps type
This commit is contained in:
@@ -327,6 +327,19 @@ export type CompositeNavigationProp<
|
||||
A extends NavigationProp<any, any, any, any, infer E> ? E : {}
|
||||
>;
|
||||
|
||||
export type CompositeScreenProps<
|
||||
A extends {
|
||||
navigation: NavigationProp<ParamListBase, string, any, any>;
|
||||
route: RouteProp<ParamListBase>;
|
||||
},
|
||||
B extends {
|
||||
navigation: NavigationHelpersCommon<ParamListBase, any>;
|
||||
}
|
||||
> = {
|
||||
navigation: CompositeNavigationProp<A['navigation'], B['navigation']>;
|
||||
route: A['route'];
|
||||
};
|
||||
|
||||
export type Descriptor<
|
||||
ScreenOptions extends {},
|
||||
Navigation extends NavigationProp<any, any, any, any, any>,
|
||||
|
||||
Reference in New Issue
Block a user