mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-12 22:51:18 +08:00
fix: fix typechecking in linking config
This commit is contained in:
@@ -632,10 +632,9 @@ export type PathConfig<ParamList extends {}> = {
|
||||
};
|
||||
|
||||
export type PathConfigMap<ParamList extends {}> = {
|
||||
[RouteName in keyof ParamList]?: ParamList[RouteName] extends NavigatorScreenParams<
|
||||
infer T,
|
||||
any
|
||||
>
|
||||
[RouteName in keyof ParamList]?: NonNullable<
|
||||
ParamList[RouteName]
|
||||
> extends NavigatorScreenParams<infer T, any>
|
||||
? string | PathConfig<T>
|
||||
: string | Omit<PathConfig<{}>, 'screens' | 'initialRouteName'>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user