Skip to content

Commit 1ab0349

Browse files
authored
Fix typescript docs for custom navigators
1 parent f56761a commit 1ab0349

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

versioned_docs/version-7.x/custom-navigators.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,29 @@ type TabNavigationEventMap = {
213213
};
214214
};
215215

216+
// The type of the navigation object for each screen
217+
type TabNavigationProp<
218+
ParamList extends ParamListBase,
219+
RouteName extends keyof ParamList = keyof ParamList,
220+
NavigatorID extends string | undefined = undefined,
221+
> = NavigationProp<
222+
ParamList,
223+
RouteName,
224+
NavigatorID,
225+
TabNavigationState<ParamList>,
226+
TabNavigationOptions,
227+
TabNavigationEventMap
228+
> &
229+
TabActionHelpers<ParamList>;
230+
216231
// The props accepted by the component is a combination of 3 things
217232
type Props = DefaultNavigatorOptions<
218233
ParamListBase,
234+
string | undefined,
219235
TabNavigationState<ParamListBase>,
220236
TabNavigationOptions,
221-
TabNavigationEventMap
237+
TabNavigationEventMap,
238+
TabNavigationProp<ParamListBase>
222239
> &
223240
TabRouterOptions &
224241
TabNavigationConfig;

0 commit comments

Comments
 (0)