generated from yappeizhen/React-Native-Expo-Boilerplate-v2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.tsx
62 lines (51 loc) · 1.59 KB
/
types.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* Learn more about using TypeScript with React Navigation:
* https://reactnavigation.org/docs/typescript/
*/
import { BottomTabScreenProps } from "@react-navigation/bottom-tabs";
import {
CompositeScreenProps,
NavigatorScreenParams,
} from "@react-navigation/native";
import { NativeStackScreenProps } from "@react-navigation/native-stack";
declare global {
namespace ReactNavigation {
interface RootParamList extends HomeStackParamList {}
}
}
export type StaticsStackParamList = {
Statics: undefined;
Pushups: undefined;
Situps: undefined;
};
export type AuthStackParamList = {
Login: undefined;
Register: undefined;
};
export type AuthStackScreenProps<Screen extends keyof AuthStackParamList> =
NativeStackScreenProps<AuthStackParamList, Screen>;
export type HomeStackParamList = {
Home: NavigatorScreenParams<RootTabParamList> | undefined;
Modal: undefined;
NotFound: undefined;
};
export type HomeStackScreenProps<Screen extends keyof HomeStackParamList> =
NativeStackScreenProps<HomeStackParamList, Screen>;
export type RootTabParamList = {
MyStats: undefined;
Runs: undefined;
StaticsStack: undefined;
Calculator: undefined;
};
export type RootTabScreenProps<Screen extends keyof RootTabParamList> =
CompositeScreenProps<
BottomTabScreenProps<RootTabParamList, Screen>,
NativeStackScreenProps<HomeStackParamList>
>;
export type RootDrawerParamList = {
AuthStack: undefined;
Root: undefined;
EditProfile: undefined;
};
export type RootDrawerScreenProps<Screen extends keyof RootDrawerParamList> =
NativeStackScreenProps<RootDrawerParamList, Screen>;