1 | import type { NavigationAction, NavigationState, PartialState, Router, RouterConfigOptions } from '@react-navigation/routers';
|
2 | import { ChildActionListener, ChildBeforeRemoveListener } from './NavigationBuilderContext';
|
3 | import type { EventMapCore } from './types';
|
4 | import type { NavigationEventEmitter } from './useEventEmitter';
|
5 | type Options = {
|
6 | router: Router<NavigationState, NavigationAction>;
|
7 | key?: string;
|
8 | getState: () => NavigationState;
|
9 | setState: (state: NavigationState | PartialState<NavigationState>) => void;
|
10 | actionListeners: ChildActionListener[];
|
11 | beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;
|
12 | routerConfigOptions: RouterConfigOptions;
|
13 | emitter: NavigationEventEmitter<EventMapCore<any>>;
|
14 | };
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export default function useOnAction({ router, getState, setState, key, actionListeners, beforeRemoveListeners, routerConfigOptions, emitter, }: Options): (action: NavigationAction, visitedNavigators?: Set<string>) => boolean;
|
25 | export {};
|
26 |
|
\ | No newline at end of file |