From fdc42d5405ac24ff358f131c468c9fb37f52683e Mon Sep 17 00:00:00 2001 From: sondremare Date: Thu, 9 Nov 2017 09:21:00 +0100 Subject: [PATCH] fix(typings): add missing properties and in general fix typings (#2605) Significant change is that TabProps no longer extend SceneProps, as Tabs do not need to have a component set. Was unable to add which properties should be inherited from SceneProps to TabProps due to the fact that there is no code in Tabs.js --- index.d.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/index.d.ts b/index.d.ts index 45e85bc61..b8edba697 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,7 +11,7 @@ export type Router = RouterStatic; export var Reducer: any; export type Reducer = any; -// Router +// Router interface RouterProps extends React.Props { sceneStyle?: StyleProp; backAndroidHandler?: Function; @@ -90,7 +90,7 @@ interface TabsProps extends React.Props { tabBarOnPress?: function; backToInitial?: boolean; } -interface TabsStatic extends React.ComponentClass { } +interface TabsStatic extends React.ComponentClass { } export type TabBarPositionType = "top" | "bottom"; // Drawer @@ -116,7 +116,7 @@ export type Overlay = OverlayStatic; interface OverlayProps extends React.Props { } interface OverlayStatic extends React.ComponentClass { } -// Lightbox +// Lightbox export var Lightbox : LightboxStatic; export type Lightbox = LightboxStatic; interface LightboxProps extends React.Props { } @@ -125,13 +125,18 @@ interface LightboxStatic extends React.ComponentClass { } // Stack export var Stack: StackStatic; export type Stack = StackStatic; -interface StackProps extends React.Props { + +interface StackProps extends React.Props { navigationBarStyle?: StyleProp; + icon?: any; + tintColor?: string; + hideNavBar?: boolean; +} +interface StackStatic extends React.ComponentClass { } -interface StackStatic extends React.ComponentClass { } -export var Actions: ActionsStatic & ActionsGenericStatic; -export type Actions = ActionsStatic & ActionsGenericStatic; +export var Actions: ActionsGenericStatic; +export type Actions = ActionsGenericStatic; interface ActionsStatic { currentScene: string; jump: (sceneKey: string, props?: any) => void; @@ -146,7 +151,7 @@ interface ActionsStatic { drawerClose?: () => void; } -interface ActionsGenericStatic { +interface ActionsGenericStatic extends ActionsStatic { [key: string]: (props?: any) => void; }