diff --git a/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js b/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js @@ -1492,53 +1492,47 @@ +tabLongPress: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactTabNavigationProp< - ParamList: ParamListBase, - RouteName: $Keys, - Options: {...}, - EventMap: EventMapBase, + declare type TabExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +jumpTo: SimpleNavigate, + |}; + + declare export type BottomTabNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + EventMap: EventMapBase = BottomTabNavigationEventMap, > = { - ...$Exact>, - +jumpTo: SimpleNavigate, + ...TabExtraNavigationHelpers, ... }; - declare export type InexactBottomTabNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = BottomTabOptions, - EventMap: EventMapBase = BottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; - declare export type BottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = BottomTabOptions, EventMap: EventMapBase = BottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous bottom tab exports */ declare export type BottomTabDescriptor = Descriptor< - BottomTabNavigationProp<>, + BottomTabNavigationHelpers<>, BottomTabOptions, >; @@ -1562,7 +1556,7 @@ declare type BottomTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: BottomTabNavigationProp<>, + +navigation: BottomTabNavigationHelpers<>, +descriptors: {| +[key: string]: BottomTabDescriptor |}, |}; @@ -1585,10 +1579,10 @@ |}; declare export type BottomTabNavigatorProps< - NavProp: InexactBottomTabNavigationProp<> = BottomTabNavigationProp<>, + NavHelpers: BottomTabNavigationHelpers<> = BottomTabNavigationHelpers<>, > = {| ...ExtraBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1616,29 +1610,34 @@ +tabPress: {| +data: void, +canPreventDefault: true |}, |}; - declare export type InexactMaterialBottomTabNavigationProp< + declare export type MaterialBottomTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialBottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material bottom tab exports @@ -1731,11 +1730,11 @@ |}; declare export type MaterialBottomTabNavigatorProps< - NavProp: InexactMaterialBottomTabNavigationProp<> = - MaterialBottomTabNavigationProp<>, + NavHelpers: MaterialBottomTabNavigationHelpers<> = + MaterialBottomTabNavigationHelpers<>, > = {| ...ExtraMaterialBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1764,29 +1763,34 @@ +swipeEnd: {| +data: void, +canPreventDefault: false |}, |}; - declare export type InexactMaterialTopTabNavigationProp< + declare export type MaterialTopTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialTopTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material top tab exports @@ -1858,13 +1862,13 @@ |}>; declare export type MaterialTopTabDescriptor = Descriptor< - MaterialBottomTabNavigationProp<>, + MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, >; declare type MaterialTopTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: MaterialTopTabNavigationProp<>, + +navigation: MaterialTopTabNavigationHelpers<>, +descriptors: {| +[key: string]: MaterialTopTabDescriptor |}, |}; @@ -1900,11 +1904,11 @@ |}; declare export type MaterialTopTabNavigatorProps< - NavProp: InexactMaterialTopTabNavigationProp<> = - MaterialTopTabNavigationProp<>, + NavHelpers: MaterialTopTabNavigationHelpers<> = + MaterialTopTabNavigationHelpers<>, > = {| ...ExtraMaterialTopTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** diff --git a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js @@ -1492,53 +1492,47 @@ +tabLongPress: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactTabNavigationProp< - ParamList: ParamListBase, - RouteName: $Keys, - Options: {...}, - EventMap: EventMapBase, + declare type TabExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +jumpTo: SimpleNavigate, + |}; + + declare export type BottomTabNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + EventMap: EventMapBase = BottomTabNavigationEventMap, > = { - ...$Exact>, - +jumpTo: SimpleNavigate, + ...TabExtraNavigationHelpers, ... }; - declare export type InexactBottomTabNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = BottomTabOptions, - EventMap: EventMapBase = BottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; - declare export type BottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = BottomTabOptions, EventMap: EventMapBase = BottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous bottom tab exports */ declare export type BottomTabDescriptor = Descriptor< - BottomTabNavigationProp<>, + BottomTabNavigationHelpers<>, BottomTabOptions, >; @@ -1562,7 +1556,7 @@ declare type BottomTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: BottomTabNavigationProp<>, + +navigation: BottomTabNavigationHelpers<>, +descriptors: {| +[key: string]: BottomTabDescriptor |}, |}; @@ -1585,10 +1579,10 @@ |}; declare export type BottomTabNavigatorProps< - NavProp: InexactBottomTabNavigationProp<> = BottomTabNavigationProp<>, + NavHelpers: BottomTabNavigationHelpers<> = BottomTabNavigationHelpers<>, > = {| ...ExtraBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1616,29 +1610,34 @@ +tabPress: {| +data: void, +canPreventDefault: true |}, |}; - declare export type InexactMaterialBottomTabNavigationProp< + declare export type MaterialBottomTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialBottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material bottom tab exports @@ -1731,11 +1730,11 @@ |}; declare export type MaterialBottomTabNavigatorProps< - NavProp: InexactMaterialBottomTabNavigationProp<> = - MaterialBottomTabNavigationProp<>, + NavHelpers: MaterialBottomTabNavigationHelpers<> = + MaterialBottomTabNavigationHelpers<>, > = {| ...ExtraMaterialBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1764,29 +1763,34 @@ +swipeEnd: {| +data: void, +canPreventDefault: false |}, |}; - declare export type InexactMaterialTopTabNavigationProp< + declare export type MaterialTopTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialTopTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material top tab exports @@ -1858,13 +1862,13 @@ |}>; declare export type MaterialTopTabDescriptor = Descriptor< - MaterialBottomTabNavigationProp<>, + MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, >; declare type MaterialTopTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: MaterialTopTabNavigationProp<>, + +navigation: MaterialTopTabNavigationHelpers<>, +descriptors: {| +[key: string]: MaterialTopTabDescriptor |}, |}; @@ -1900,11 +1904,11 @@ |}; declare export type MaterialTopTabNavigatorProps< - NavProp: InexactMaterialTopTabNavigationProp<> = - MaterialTopTabNavigationProp<>, + NavHelpers: MaterialTopTabNavigationHelpers<> = + MaterialTopTabNavigationHelpers<>, > = {| ...ExtraMaterialTopTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** diff --git a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js @@ -1492,53 +1492,47 @@ +tabLongPress: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactTabNavigationProp< - ParamList: ParamListBase, - RouteName: $Keys, - Options: {...}, - EventMap: EventMapBase, + declare type TabExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +jumpTo: SimpleNavigate, + |}; + + declare export type BottomTabNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + EventMap: EventMapBase = BottomTabNavigationEventMap, > = { - ...$Exact>, - +jumpTo: SimpleNavigate, + ...TabExtraNavigationHelpers, ... }; - declare export type InexactBottomTabNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = BottomTabOptions, - EventMap: EventMapBase = BottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; - declare export type BottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = BottomTabOptions, EventMap: EventMapBase = BottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous bottom tab exports */ declare export type BottomTabDescriptor = Descriptor< - BottomTabNavigationProp<>, + BottomTabNavigationHelpers<>, BottomTabOptions, >; @@ -1562,7 +1556,7 @@ declare type BottomTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: BottomTabNavigationProp<>, + +navigation: BottomTabNavigationHelpers<>, +descriptors: {| +[key: string]: BottomTabDescriptor |}, |}; @@ -1585,10 +1579,10 @@ |}; declare export type BottomTabNavigatorProps< - NavProp: InexactBottomTabNavigationProp<> = BottomTabNavigationProp<>, + NavHelpers: BottomTabNavigationHelpers<> = BottomTabNavigationHelpers<>, > = {| ...ExtraBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1616,29 +1610,34 @@ +tabPress: {| +data: void, +canPreventDefault: true |}, |}; - declare export type InexactMaterialBottomTabNavigationProp< + declare export type MaterialBottomTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialBottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material bottom tab exports @@ -1731,11 +1730,11 @@ |}; declare export type MaterialBottomTabNavigatorProps< - NavProp: InexactMaterialBottomTabNavigationProp<> = - MaterialBottomTabNavigationProp<>, + NavHelpers: MaterialBottomTabNavigationHelpers<> = + MaterialBottomTabNavigationHelpers<>, > = {| ...ExtraMaterialBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1764,29 +1763,34 @@ +swipeEnd: {| +data: void, +canPreventDefault: false |}, |}; - declare export type InexactMaterialTopTabNavigationProp< + declare export type MaterialTopTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialTopTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material top tab exports @@ -1858,13 +1862,13 @@ |}>; declare export type MaterialTopTabDescriptor = Descriptor< - MaterialBottomTabNavigationProp<>, + MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, >; declare type MaterialTopTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: MaterialTopTabNavigationProp<>, + +navigation: MaterialTopTabNavigationHelpers<>, +descriptors: {| +[key: string]: MaterialTopTabDescriptor |}, |}; @@ -1900,11 +1904,11 @@ |}; declare export type MaterialTopTabNavigatorProps< - NavProp: InexactMaterialTopTabNavigationProp<> = - MaterialTopTabNavigationProp<>, + NavHelpers: MaterialTopTabNavigationHelpers<> = + MaterialTopTabNavigationHelpers<>, > = {| ...ExtraMaterialTopTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** diff --git a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/native_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/native_v5.x.x.js @@ -1492,53 +1492,47 @@ +tabLongPress: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactTabNavigationProp< - ParamList: ParamListBase, - RouteName: $Keys, - Options: {...}, - EventMap: EventMapBase, + declare type TabExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +jumpTo: SimpleNavigate, + |}; + + declare export type BottomTabNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + EventMap: EventMapBase = BottomTabNavigationEventMap, > = { - ...$Exact>, - +jumpTo: SimpleNavigate, + ...TabExtraNavigationHelpers, ... }; - declare export type InexactBottomTabNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = BottomTabOptions, - EventMap: EventMapBase = BottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; - declare export type BottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = BottomTabOptions, EventMap: EventMapBase = BottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous bottom tab exports */ declare export type BottomTabDescriptor = Descriptor< - BottomTabNavigationProp<>, + BottomTabNavigationHelpers<>, BottomTabOptions, >; @@ -1562,7 +1556,7 @@ declare type BottomTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: BottomTabNavigationProp<>, + +navigation: BottomTabNavigationHelpers<>, +descriptors: {| +[key: string]: BottomTabDescriptor |}, |}; @@ -1585,10 +1579,10 @@ |}; declare export type BottomTabNavigatorProps< - NavProp: InexactBottomTabNavigationProp<> = BottomTabNavigationProp<>, + NavHelpers: BottomTabNavigationHelpers<> = BottomTabNavigationHelpers<>, > = {| ...ExtraBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1616,29 +1610,34 @@ +tabPress: {| +data: void, +canPreventDefault: true |}, |}; - declare export type InexactMaterialBottomTabNavigationProp< + declare export type MaterialBottomTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialBottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material bottom tab exports @@ -1731,11 +1730,11 @@ |}; declare export type MaterialBottomTabNavigatorProps< - NavProp: InexactMaterialBottomTabNavigationProp<> = - MaterialBottomTabNavigationProp<>, + NavHelpers: MaterialBottomTabNavigationHelpers<> = + MaterialBottomTabNavigationHelpers<>, > = {| ...ExtraMaterialBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1764,29 +1763,34 @@ +swipeEnd: {| +data: void, +canPreventDefault: false |}, |}; - declare export type InexactMaterialTopTabNavigationProp< + declare export type MaterialTopTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialTopTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material top tab exports @@ -1858,13 +1862,13 @@ |}>; declare export type MaterialTopTabDescriptor = Descriptor< - MaterialBottomTabNavigationProp<>, + MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, >; declare type MaterialTopTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: MaterialTopTabNavigationProp<>, + +navigation: MaterialTopTabNavigationHelpers<>, +descriptors: {| +[key: string]: MaterialTopTabDescriptor |}, |}; @@ -1900,11 +1904,11 @@ |}; declare export type MaterialTopTabNavigatorProps< - NavProp: InexactMaterialTopTabNavigationProp<> = - MaterialTopTabNavigationProp<>, + NavHelpers: MaterialTopTabNavigationHelpers<> = + MaterialTopTabNavigationHelpers<>, > = {| ...ExtraMaterialTopTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** diff --git a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js --- a/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js +++ b/native/flow-typed/npm/@react-navigation/stack_v5.x.x.js @@ -1492,53 +1492,47 @@ +tabLongPress: {| +data: void, +canPreventDefault: false |}, |}; - declare type InexactTabNavigationProp< - ParamList: ParamListBase, - RouteName: $Keys, - Options: {...}, - EventMap: EventMapBase, + declare type TabExtraNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + > = {| + +jumpTo: SimpleNavigate, + |}; + + declare export type BottomTabNavigationHelpers< + ParamList: ParamListBase = ParamListBase, + EventMap: EventMapBase = BottomTabNavigationEventMap, > = { - ...$Exact>, - +jumpTo: SimpleNavigate, + ...TabExtraNavigationHelpers, ... }; - declare export type InexactBottomTabNavigationProp< - ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = BottomTabOptions, - EventMap: EventMapBase = BottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; - declare export type BottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = BottomTabOptions, EventMap: EventMapBase = BottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous bottom tab exports */ declare export type BottomTabDescriptor = Descriptor< - BottomTabNavigationProp<>, + BottomTabNavigationHelpers<>, BottomTabOptions, >; @@ -1562,7 +1556,7 @@ declare type BottomTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: BottomTabNavigationProp<>, + +navigation: BottomTabNavigationHelpers<>, +descriptors: {| +[key: string]: BottomTabDescriptor |}, |}; @@ -1585,10 +1579,10 @@ |}; declare export type BottomTabNavigatorProps< - NavProp: InexactBottomTabNavigationProp<> = BottomTabNavigationProp<>, + NavHelpers: BottomTabNavigationHelpers<> = BottomTabNavigationHelpers<>, > = {| ...ExtraBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1616,29 +1610,34 @@ +tabPress: {| +data: void, +canPreventDefault: true |}, |}; - declare export type InexactMaterialBottomTabNavigationProp< + declare export type MaterialBottomTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialBottomTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialBottomTabOptions, EventMap: EventMapBase = MaterialBottomTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material bottom tab exports @@ -1731,11 +1730,11 @@ |}; declare export type MaterialBottomTabNavigatorProps< - NavProp: InexactMaterialBottomTabNavigationProp<> = - MaterialBottomTabNavigationProp<>, + NavHelpers: MaterialBottomTabNavigationHelpers<> = + MaterialBottomTabNavigationHelpers<>, > = {| ...ExtraMaterialBottomTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** @@ -1764,29 +1763,34 @@ +swipeEnd: {| +data: void, +canPreventDefault: false |}, |}; - declare export type InexactMaterialTopTabNavigationProp< + declare export type MaterialTopTabNavigationHelpers< ParamList: ParamListBase = ParamListBase, - RouteName: $Keys = $Keys, - Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = InexactTabNavigationProp< - ParamList, - RouteName, - Options, - EventMap, - >; + > = { + ...$Exact>, + ...TabExtraNavigationHelpers, + ... + }; declare export type MaterialTopTabNavigationProp< ParamList: ParamListBase = ParamListBase, RouteName: $Keys = $Keys, Options: {...} = MaterialTopTabOptions, EventMap: EventMapBase = MaterialTopTabNavigationEventMap, - > = $Exact>; + > = {| + ...$Exact>, + ...TabExtraNavigationHelpers, + |}; /** * Miscellaneous material top tab exports @@ -1858,13 +1862,13 @@ |}>; declare export type MaterialTopTabDescriptor = Descriptor< - MaterialBottomTabNavigationProp<>, + MaterialBottomTabNavigationHelpers<>, MaterialBottomTabOptions, >; declare type MaterialTopTabNavigationBuilderResult = {| +state: TabNavigationState, - +navigation: MaterialTopTabNavigationProp<>, + +navigation: MaterialTopTabNavigationHelpers<>, +descriptors: {| +[key: string]: MaterialTopTabDescriptor |}, |}; @@ -1900,11 +1904,11 @@ |}; declare export type MaterialTopTabNavigatorProps< - NavProp: InexactMaterialTopTabNavigationProp<> = - MaterialTopTabNavigationProp<>, + NavHelpers: MaterialTopTabNavigationHelpers<> = + MaterialTopTabNavigationHelpers<>, > = {| ...ExtraMaterialTopTabNavigatorProps, - ...ScreenOptionsProp, + ...ScreenOptionsProp, |}; /** diff --git a/native/navigation/app-navigator.react.js b/native/navigation/app-navigator.react.js --- a/native/navigation/app-navigator.react.js +++ b/native/navigation/app-navigator.react.js @@ -1,6 +1,9 @@ // @flow -import type { BottomTabNavigationProp } from '@react-navigation/bottom-tabs'; +import type { + BottomTabNavigationHelpers, + BottomTabNavigationProp, +} from '@react-navigation/bottom-tabs'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import * as SplashScreen from 'expo-splash-screen'; import * as React from 'react'; @@ -95,7 +98,7 @@ const Tab = createBottomTabNavigator< ScreenParamList, TabParamList, - TabNavigationProp<>, + BottomTabNavigationHelpers, >(); const tabBarOptions = { keyboardHidesTabBar: false,