From b1134c8a34f96be2817cb780c4bd23b2025b4c35 Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Thu, 1 Jul 2021 03:06:37 +0200 Subject: [PATCH] fix: fix typechecking in linking config --- packages/core/src/types.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/core/src/types.tsx b/packages/core/src/types.tsx index 5ea9aed2..7ac03bf2 100644 --- a/packages/core/src/types.tsx +++ b/packages/core/src/types.tsx @@ -632,10 +632,9 @@ export type PathConfig = { }; export type PathConfigMap = { - [RouteName in keyof ParamList]?: ParamList[RouteName] extends NavigatorScreenParams< - infer T, - any - > + [RouteName in keyof ParamList]?: NonNullable< + ParamList[RouteName] + > extends NavigatorScreenParams ? string | PathConfig : string | Omit, 'screens' | 'initialRouteName'>; };