@@ -471,26 +471,24 @@ Custom navigators now require more type information to work correctly so that we
471471- typeof MyNavigator
472472- >(MyNavigator);
473473+ 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 = {
477477+ ParamList: ParamList;
478478+ NavigatorID: NavigatorID;
479- + State: MyNavigationState <ParamList>;
480- + ScreenOptions: MyNavigationOptions ;
481- + EventMap: MyNavigationEventMap ;
479+ + State: TabNavigationState <ParamList>;
480+ + ScreenOptions: TabNavigationOptions ;
481+ + EventMap: TabNavigationEventMap ;
482482+ NavigationList: {
483- + [RouteName in keyof ParamList]: MyNavigationProp <
483+ + [RouteName in keyof ParamList]: TabNavigationProp <
484484+ ParamList,
485485+ RouteName,
486486+ NavigatorID
487487+ >;
488488+ };
489- + Navigator: typeof MyNavigator ;
489+ + Navigator: typeof TabNavigator ;
490490+ },
491- + Config extends StaticConfig<TypeBag> | undefined =
492- + | StaticConfig<TypeBag>
493- + | undefined,
491+ + const Config extends StaticConfig<TypeBag> = StaticConfig<TypeBag>,
494492+ >(config?: Config): TypedNavigator<TypeBag, Config> {
495493+ return createNavigatorFactory(MyNavigator)(config);
496494+ }
0 commit comments