@@ -66,10 +66,14 @@ declare module 'react-navigation' {
66
66
67
67
export const HeaderStyleInterpolator : HeaderStyleInterpolatorStatic ;
68
68
69
+ export type ScreenProps = {
70
+ [ key : string ] : any ;
71
+ }
72
+
69
73
// @todo - any..
70
74
export function getActiveChildNavigationOptions < S > (
71
75
navigation : NavigationProp < S > ,
72
- screenProps ?: object
76
+ screenProps ?: ScreenProps
73
77
) : NavigationParams ;
74
78
75
79
// @todo when we split types into common, native and web,
@@ -172,7 +176,7 @@ declare module 'react-navigation' {
172
176
173
177
export type NavigationScreenOptionsGetter < Options > = (
174
178
navigation : NavigationScreenProp < NavigationRoute < any > > ,
175
- screenProps ?: { [ key : string ] : any }
179
+ screenProps ?: ScreenProps
176
180
) => Options ;
177
181
178
182
export interface NavigationRouter < State = NavigationState , Options = { } > {
@@ -233,7 +237,7 @@ declare module 'react-navigation' {
233
237
234
238
export interface NavigationScreenConfigProps {
235
239
navigation : NavigationScreenProp < NavigationRoute > ;
236
- screenProps : { [ key : string ] : any } ;
240
+ screenProps : ScreenProps ;
237
241
}
238
242
239
243
export type NavigationScreenConfig < Options > =
@@ -732,7 +736,7 @@ declare module 'react-navigation' {
732
736
export interface NavigationNavigatorProps < O = { } , S = { } > {
733
737
detached ?: boolean ;
734
738
navigation ?: NavigationProp < S > ;
735
- screenProps ?: { [ key : string ] : any } ;
739
+ screenProps ?: ScreenProps ;
736
740
navigationOptions ?: O ;
737
741
}
738
742
@@ -787,7 +791,7 @@ declare module 'react-navigation' {
787
791
scene : NavigationScene ;
788
792
index : number ;
789
793
790
- screenProps ?: { [ key : string ] : any } ;
794
+ screenProps ?: ScreenProps ;
791
795
}
792
796
793
797
// The scene renderer props are nearly identical to the props used for rendering
@@ -885,7 +889,7 @@ declare module 'react-navigation' {
885
889
navigation ?: NavigationScreenProp < S > ;
886
890
persistenceKey ?: string | null ;
887
891
renderLoadingExperimental ?: React . ComponentType ;
888
- screenProps ?: any ;
892
+ screenProps ?: ScreenProps ;
889
893
navigationOptions ?: O ;
890
894
style ?: StyleProp < ViewStyle > ;
891
895
}
@@ -907,7 +911,7 @@ declare module 'react-navigation' {
907
911
) : NavigationContainerComponent ;
908
912
909
913
router : NavigationRouter < any , any > ;
910
- screenProps : { [ key : string ] : any } ;
914
+ screenProps : ScreenProps ;
911
915
navigationOptions : any ;
912
916
state : { nav : NavigationState | null } ;
913
917
}
@@ -1280,7 +1284,7 @@ declare module 'react-navigation' {
1280
1284
{
1281
1285
descriptors : { [ key : string ] : NavigationDescriptor } ;
1282
1286
navigationConfig : O ;
1283
- screenProps ?: { [ key : string ] : any } ;
1287
+ screenProps ?: ScreenProps ;
1284
1288
} & NavigationInjectedProps
1285
1289
> ;
1286
1290
@@ -1325,7 +1329,7 @@ declare module 'react-navigation' {
1325
1329
Options = any
1326
1330
> {
1327
1331
navigation : NavigationScreenProp < NavigationRoute < Params > , Params > ;
1328
- screenProps ?: { [ key : string ] : any } ;
1332
+ screenProps ?: ScreenProps ;
1329
1333
navigationOptions ?: NavigationScreenConfig < Options > ;
1330
1334
}
1331
1335
0 commit comments