-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from funnyzak/bug/navigator_patch
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | { |