These two types are missing entirely from the flow definition, while they're incomplete they at least prevent flow from complaining that they're not defined at all.
I decided against copying the `ScrollView` types from `react-native` as they're really quite complex and likely to fall out-of-sync with the implementation in `react-native`. So instead I'd recommend overriding the types when consuming using something like:
```js
import {ScrollView as NativeScrollView} from 'react-native';
import {ScrollView as NavigationScrollView} from 'react-navigation';
const ScrollView: React.ComponentType<typeof NativeScrollView>) = NavigationScrollView;
```
- `NavigationScreenProp<NavigationRoute>` is the type of `navigation` property which contains `state` and such. This is not applicable to `navigationOptions` at all.
In my last PR I flipped the order of these around to fix an error, but turns out that was just crippling the type. The correct solution here, to guarantee that the `$PropertyType` won't error if its type parameter don't have the property, is to use an unsealed object type.
Some additional context in discussion on #5806.
Changes:
1. We can now type React components with static members as `React.ComponentType` (instead of requiring the `StatelessFunctionalComponent`) hack.
2. We can now type-parameterize React components on all of their props, instead of just the ones we care about. Not sure why this wasn't previously. Note: this is a breaking change, in the sense that people's parameterization of `NavigationScreenComponent`, `NavigationNavigator`, and `NavigationContainer` may need to change.
3. The order of object-type-spread in the `getParam` definition has been switched. It was giving errors with the old order.
4. Avoid recursive type inference `NavigationScreenProp`. This was yielding an "*** Recursion limit exceeded ***" error, which was rather difficult to debug. We can just use a `NavigationState` and let the user cast.
5. Fix `onTransitionStart`/`onTransitionEnd` types in `NavigationStackViewConfig`.
6. Add `navigationConfig` property to `NavigationView`.