@@ -471,26 +471,24 @@ Custom navigators now require more type information to work correctly so that we
471
471
- typeof MyNavigator
472
472
- >(MyNavigator);
473
473
+ export function createMyNavigator<
474
- + ParamList extends ParamListBase,
475
- + NavigatorID extends string | undefined = undefined,
476
- + TypeBag extends NavigatorTypeBagBase = {
474
+ + const ParamList extends ParamListBase,
475
+ + const NavigatorID extends string | undefined = undefined,
476
+ + const TypeBag extends NavigatorTypeBagBase = {
477
477
+ ParamList: ParamList;
478
478
+ NavigatorID: NavigatorID;
479
- + State: MyNavigationState <ParamList>;
480
- + ScreenOptions: MyNavigationOptions ;
481
- + EventMap: MyNavigationEventMap ;
479
+ + State: TabNavigationState <ParamList>;
480
+ + ScreenOptions: TabNavigationOptions ;
481
+ + EventMap: TabNavigationEventMap ;
482
482
+ NavigationList: {
483
- + [RouteName in keyof ParamList]: MyNavigationProp <
483
+ + [RouteName in keyof ParamList]: TabNavigationProp <
484
484
+ ParamList,
485
485
+ RouteName,
486
486
+ NavigatorID
487
487
+ >;
488
488
+ };
489
- + Navigator: typeof MyNavigator ;
489
+ + Navigator: typeof TabNavigator ;
490
490
+ },
491
- + Config extends StaticConfig<TypeBag> | undefined =
492
- + | StaticConfig<TypeBag>
493
- + | undefined,
491
+ + const Config extends StaticConfig<TypeBag> = StaticConfig<TypeBag>,
494
492
+ >(config?: Config): TypedNavigator<TypeBag, Config> {
495
493
+ return createNavigatorFactory(MyNavigator)(config);
496
494
+ }
0 commit comments