UNPKG

641 BTypeScriptView Raw
1import type { CommonActions, NavigationState, PartialState } from '@react-navigation/routers';
2import type { NavigatorScreenParams, PathConfigMap } from './types';
3declare type Options = {
4 initialRouteName?: string;
5 screens: PathConfigMap<object>;
6};
7declare type NavigateAction<State extends NavigationState> = {
8 type: 'NAVIGATE';
9 payload: {
10 name: string;
11 params?: NavigatorScreenParams<State>;
12 path?: string;
13 };
14};
15export default function getActionFromState(state: PartialState<NavigationState>, options?: Options): NavigateAction<NavigationState> | CommonActions.Action | undefined;
16export {};