The type inference comes from const Stack = createStackNavigator();
.
I suspect you need to pass your RootStackParamList
type in like so: const Stack = createStackNavigator<RootStackParamList>();
Please see the docs, they are quite helpful: https://reactnavigation.org/docs/typescript/