From 25a909bc5edc627627ed88084e269dbae20a5456 Mon Sep 17 00:00:00 2001 From: Jakub Kosmydel <104823336+kosmydel@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:57:57 +0100 Subject: [PATCH] another typescript step --- .../AppNavigator/createCustomStackNavigator/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx index 514b7b8030f3..f69a42072c52 100644 --- a/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx +++ b/src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx @@ -1,4 +1,4 @@ -import {createNavigatorFactory, ParamListBase, StackActionHelpers, StackNavigationState, useNavigationBuilder} from '@react-navigation/native'; +import {CommonNavigationAction, createNavigatorFactory, ParamListBase, RouterFactory, StackActionHelpers, StackActionType, StackNavigationState, useNavigationBuilder} from '@react-navigation/native'; import {StackNavigationEventMap, StackNavigationOptions, StackView} from '@react-navigation/stack'; import React, {useMemo, useRef} from 'react'; import useWindowDimensions from '@hooks/useWindowDimensions'; @@ -27,9 +27,9 @@ function reduceReportRoutes(routes: Routes): Routes { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -type CustomRouterFactory = any; +type CustomRouterFactory = RouterFactory, CommonNavigationAction | StackActionType, ResponsiveStackNavigatorRouterOptions>; -function ResponsiveStackNavigatorFactory(customRouter: CustomRouterFactory) { +function ResponsiveStackNavigatorFactory(customRouter: CustomRouterFactory) { function ResponsiveStackNavigator(props: ResponsiveStackNavigatorProps) { const {isSmallScreenWidth} = useWindowDimensions(); @@ -77,7 +77,7 @@ function ResponsiveStackNavigatorFactory(custom return ResponsiveStackNavigator; } -function createCustomStackNavigator(customRouter: CustomRouterFactory) { +function createCustomStackNavigator(customRouter: CustomRouterFactory) { const responsiveStackNavigator = ResponsiveStackNavigatorFactory(customRouter);