Skip to content

Commit

Permalink
fix: fix typechecking in linking config
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Nov 27, 2022
1 parent c6506ee commit 57389eb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/core/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'>;
};

0 comments on commit 57389eb

Please sign in to comment.