From b315960713f89d84a49f4da9d07c2905c19faa80 Mon Sep 17 00:00:00 2001 From: Tim Wang Date: Mon, 25 Jun 2018 16:49:40 +0800 Subject: [PATCH] Remove `void` State generic --- types/react-native-tab-view/index.d.ts | 28 +++++++------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/types/react-native-tab-view/index.d.ts b/types/react-native-tab-view/index.d.ts index c761d80d14..0fab85e947 100644 --- a/types/react-native-tab-view/index.d.ts +++ b/types/react-native-tab-view/index.d.ts @@ -2,8 +2,9 @@ // Project: https://github.com/react-native-community/react-native-tab-view // Definitions by: Kalle Ott // Kyle Roach +// Tim Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.9 import { PureComponent, ReactNode, ComponentType } from 'react' import { Animated, @@ -91,10 +92,7 @@ export type TabViewProps< style?: StyleProp } -export class TabView extends PureComponent< - TabViewProps, - any -> {} +export class TabView extends PureComponent> {} export type GestureEvent = { nativeEvent: { @@ -144,10 +142,7 @@ export type DefaultTransitionSpec = { friction: 35 } -export class PagerPan extends PureComponent< - PagerPanProps, - void -> { +export class PagerPan extends PureComponent> { static defaultProps: { configureTransition: () => DefaultTransitionSpec initialLayout: { @@ -176,10 +171,7 @@ export type PagerScrollProps< children?: ReactNode } -export class PagerScroll extends PureComponent< -PagerScrollProps, - any -> {} +export class PagerScroll extends PureComponent> {} export type PageScrollEvent = { nativeEvent: { @@ -198,10 +190,7 @@ export type PagerAndroidProps< children?: ReactNode } -export class PagerAndroid extends PureComponent< - PagerAndroidProps, - void -> {} +export class PagerAndroid extends PureComponent> {} export type IndicatorProps< T extends RouteBase = RouteBase @@ -227,10 +216,7 @@ export type TabBarProps = SceneRendererProps< style?: StyleProp } -export class TabBar extends PureComponent< - TabBarProps, - any -> {} +export class TabBar extends PureComponent> {} export function SceneMap(scenes: { [key: string]: ComponentType