2021-08-16 07:50:50 +00:00
|
|
|
/**
|
|
|
|
* Learn more about using TypeScript with React Navigation:
|
|
|
|
* https://reactnavigation.org/docs/typescript/
|
|
|
|
*/
|
|
|
|
|
2021-08-22 04:30:04 +00:00
|
|
|
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 RootStackParamList {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-16 07:50:50 +00:00
|
|
|
export type RootStackParamList = {
|
2021-08-22 04:30:04 +00:00
|
|
|
Root: NavigatorScreenParams<RootTabParamList> | undefined;
|
|
|
|
Modal: undefined;
|
2021-08-16 07:50:50 +00:00
|
|
|
NotFound: undefined;
|
|
|
|
};
|
|
|
|
|
2021-08-22 04:30:04 +00:00
|
|
|
export type RootStackScreenProps<Screen extends keyof RootStackParamList> = NativeStackScreenProps<
|
|
|
|
RootStackParamList,
|
|
|
|
Screen
|
|
|
|
>;
|
|
|
|
|
|
|
|
export type RootTabParamList = {
|
2021-08-21 13:05:22 +00:00
|
|
|
Home: undefined;
|
2021-08-16 07:50:50 +00:00
|
|
|
Settings: undefined;
|
2021-08-22 04:30:04 +00:00
|
|
|
Trip: undefined;
|
2021-08-16 07:50:50 +00:00
|
|
|
};
|
|
|
|
|
2021-08-22 04:30:04 +00:00
|
|
|
export type RootTabScreenProps<Screen extends keyof RootTabParamList> = CompositeScreenProps<
|
|
|
|
BottomTabScreenProps<RootTabParamList, Screen>,
|
|
|
|
NativeStackScreenProps<RootStackParamList>
|
|
|
|
>;
|