1 | import { ParamListBase, Route, StackNavigationState } from '@react-navigation/native';
|
2 | import * as React from 'react';
|
3 | import type { StackDescriptorMap, StackNavigationConfig, StackNavigationHelpers } from '../../types';
|
4 | type Props = StackNavigationConfig & {
|
5 | state: StackNavigationState<ParamListBase>;
|
6 | navigation: StackNavigationHelpers;
|
7 | descriptors: StackDescriptorMap;
|
8 | };
|
9 | type State = {
|
10 | routes: Route<string>[];
|
11 | previousRoutes: Route<string>[];
|
12 | previousDescriptors: StackDescriptorMap;
|
13 | openingRouteKeys: string[];
|
14 | closingRouteKeys: string[];
|
15 | replacingRouteKeys: string[];
|
16 | descriptors: StackDescriptorMap;
|
17 | };
|
18 | export default class StackView extends React.Component<Props, State> {
|
19 | static getDerivedStateFromProps(props: Readonly<Props>, state: Readonly<State>): {
|
20 | routes: Route<string, object | undefined>[];
|
21 | previousRoutes: Route<string, object | undefined>[];
|
22 | descriptors: StackDescriptorMap;
|
23 | previousDescriptors: StackDescriptorMap;
|
24 | openingRouteKeys?: undefined;
|
25 | closingRouteKeys?: undefined;
|
26 | replacingRouteKeys?: undefined;
|
27 | } | {
|
28 | routes: (Readonly<{
|
29 | key: string;
|
30 | name: string;
|
31 | path?: string | undefined;
|
32 | }> & Readonly<{
|
33 | params?: Readonly<object | undefined>;
|
34 | }> & {
|
35 | state?: Readonly<{
|
36 | key: string;
|
37 | index: number;
|
38 | routeNames: string[];
|
39 | history?: unknown[] | undefined;
|
40 | routes: (Readonly<{
|
41 | key: string;
|
42 | name: string;
|
43 | path?: string | undefined;
|
44 | }> & Readonly<{
|
45 | params?: Readonly<object | undefined>;
|
46 | }> & any)[];
|
47 | type: string;
|
48 | stale: false;
|
49 | }> | import("@react-navigation/native").PartialState<Readonly<{
|
50 | key: string;
|
51 | index: number;
|
52 | routeNames: string[];
|
53 | history?: unknown[] | undefined;
|
54 | routes: (Readonly<{
|
55 | key: string;
|
56 | name: string;
|
57 | path?: string | undefined;
|
58 | }> & Readonly<{
|
59 | params?: Readonly<object | undefined>;
|
60 | }> & any)[];
|
61 | type: string;
|
62 | stale: false;
|
63 | }>> | undefined;
|
64 | })[];
|
65 | previousRoutes: (Readonly<{
|
66 | key: string;
|
67 | name: string;
|
68 | path?: string | undefined;
|
69 | }> & Readonly<{
|
70 | params?: Readonly<object | undefined>;
|
71 | }> & {
|
72 | state?: Readonly<{
|
73 | key: string;
|
74 | index: number;
|
75 | routeNames: string[];
|
76 | history?: unknown[] | undefined;
|
77 | routes: (Readonly<{
|
78 | key: string;
|
79 | name: string;
|
80 | path?: string | undefined;
|
81 | }> & Readonly<{
|
82 | params?: Readonly<object | undefined>;
|
83 | }> & any)[];
|
84 | type: string;
|
85 | stale: false;
|
86 | }> | import("@react-navigation/native").PartialState<Readonly<{
|
87 | key: string;
|
88 | index: number;
|
89 | routeNames: string[];
|
90 | history?: unknown[] | undefined;
|
91 | routes: (Readonly<{
|
92 | key: string;
|
93 | name: string;
|
94 | path?: string | undefined;
|
95 | }> & Readonly<{
|
96 | params?: Readonly<object | undefined>;
|
97 | }> & any)[];
|
98 | type: string;
|
99 | stale: false;
|
100 | }>> | undefined;
|
101 | })[];
|
102 | previousDescriptors: StackDescriptorMap;
|
103 | openingRouteKeys: string[];
|
104 | closingRouteKeys: string[];
|
105 | replacingRouteKeys: string[];
|
106 | descriptors: StackDescriptorMap;
|
107 | };
|
108 | state: State;
|
109 | private getPreviousRoute;
|
110 | private renderScene;
|
111 | private renderHeader;
|
112 | private handleOpenRoute;
|
113 | private handleCloseRoute;
|
114 | private handleTransitionStart;
|
115 | private handleTransitionEnd;
|
116 | private handleGestureStart;
|
117 | private handleGestureEnd;
|
118 | private handleGestureCancel;
|
119 | render(): JSX.Element;
|
120 | }
|
121 | export {};
|
122 |
|
\ | No newline at end of file |