Skip to content

Commit

Permalink
Merge pull request #175 from funnyzak/bug/navigator_patch
Browse files Browse the repository at this point in the history
  • Loading branch information
funnyzak authored Nov 4, 2022
2 parents b04ef7b + d732753 commit 5b405f4
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions patches/@react-navigation/core+6.4.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
diff --git a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts
index a116b25..621590c 100644
--- a/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts
+++ b/node_modules/@react-navigation/core/lib/typescript/src/types.d.ts
@@ -142,22 +142,22 @@ declare type NavigationHelpersCommon<ParamList extends ParamListBase, State exte
* @param name Name of the route to navigate to.
* @param [params] Params object for the route.
*/
- navigate<RouteName extends keyof ParamList>(...args: RouteName extends unknown ? undefined extends ParamList[RouteName] ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]] : [screen: RouteName, params: ParamList[RouteName]] : never): void;
+ navigate<RouteName extends keyof ParamList>(...args: undefined extends ParamList[RouteName]
+ ? [screen: RouteName] | [screen: RouteName, params: ParamList[RouteName]]
+ : [screen: RouteName, params: ParamList[RouteName]]): void;
/**
* Navigate to a route in current navigation tree.
*
* @param route Object with `key` or `name` for the route to navigate to, and a `params` object.
*/
- navigate<RouteName extends keyof ParamList>(options: RouteName extends unknown ? {
- key: string;
- params?: ParamList[RouteName];
- merge?: boolean;
- } | {
- name: RouteName;
- key?: string;
- params: ParamList[RouteName];
- merge?: boolean;
- } : never): void;
+ navigate<RouteName extends keyof ParamList>(options:
+ | { key: string; params?: ParamList[RouteName]; merge?: boolean }
+ | {
+ name: RouteName;
+ key?: string;
+ params: ParamList[RouteName];
+ merge?: boolean;
+ }): void;
/**
* Reset the navigation state to the provided state.
*
@@ -324,14 +324,14 @@ export declare type RouteConfigComponent<ParamList extends ParamListBase, RouteN
/**
* React component to render for this screen.
*/
- component: ScreenComponentType<ParamList, RouteName>;
+ component: React.ComponentType<any>;
getComponent?: never;
children?: never;
} | {
/**
* Lazily get a React component to render for this screen.
*/
- getComponent: () => ScreenComponentType<ParamList, RouteName>;
+ getComponent: () => React.ComponentType<any>;
component?: never;
children?: never;
} | {

0 comments on commit 5b405f4

Please sign in to comment.