Skip to content

Commit

Permalink
fix(typings): add missing properties and in general fix typings (akso…
Browse files Browse the repository at this point in the history
…nov#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
  • Loading branch information
sondremare authored and mvanroon committed Feb 15, 2018
1 parent 3f8ccec commit fdc42d5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type Router = RouterStatic;
export var Reducer: any;
export type Reducer = any;

// Router
// Router
interface RouterProps extends React.Props<Router> {
sceneStyle?: StyleProp<ViewStyle>;
backAndroidHandler?: Function;
Expand Down Expand Up @@ -90,7 +90,7 @@ interface TabsProps extends React.Props<Tabs> {
tabBarOnPress?: function;
backToInitial?: boolean;
}
interface TabsStatic extends React.ComponentClass<SceneProps & TabsProps> { }
interface TabsStatic extends React.ComponentClass<TabsProps> { }
export type TabBarPositionType = "top" | "bottom";

// Drawer
Expand All @@ -116,7 +116,7 @@ export type Overlay = OverlayStatic;
interface OverlayProps extends React.Props<Overlay> { }
interface OverlayStatic extends React.ComponentClass<SceneProps & OverlayProps> { }

// Lightbox
// Lightbox
export var Lightbox : LightboxStatic;
export type Lightbox = LightboxStatic;
interface LightboxProps extends React.Props<Modal> { }
Expand All @@ -125,13 +125,18 @@ interface LightboxStatic extends React.ComponentClass<LightboxProps> { }
// Stack
export var Stack: StackStatic;
export type Stack = StackStatic;
interface StackProps extends React.Props<Stack> {

interface StackProps extends React.Props<Stack> {
navigationBarStyle?: StyleProp<ViewStyle>;
icon?: any;
tintColor?: string;
hideNavBar?: boolean;
}
interface StackStatic extends React.ComponentClass<StackProps> {
}
interface StackStatic extends React.ComponentClass<StackProps> { }

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;
Expand All @@ -146,7 +151,7 @@ interface ActionsStatic {
drawerClose?: () => void;

}
interface ActionsGenericStatic {
interface ActionsGenericStatic extends ActionsStatic {
[key: string]: (props?: any) => void;
}

Expand Down

0 comments on commit fdc42d5

Please sign in to comment.