From 4e8e7ed45441dc7d870825bd2ed8e0320dcc7d15 Mon Sep 17 00:00:00 2001 From: binjiechen Date: Wed, 3 Apr 2019 15:03:59 +0800 Subject: [PATCH 1/4] Fix RenderTabProperties ts lint error at react-native-scrollable-tab-view 0.10.0 --- types/react-native-scrollable-tab-view/index.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index d5c996511f..8e2d227fc0 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -1,12 +1,13 @@ -// Type definitions for react-native-scrollable-tab-view 0.8 +// Type definitions for react-native-scrollable-tab-view 0.10.0 // Project: https://github.com/brentvatne/react-native-scrollable-tab-view // Definitions by: CaiHuan // Egor Shulga +// ydostyle // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from 'react'; -import { Animated, ScrollViewProps, ViewStyle, TextStyle, StyleProp } from 'react-native'; +import { Animated, ScrollViewProps, ViewStyle, TextStyle, StyleProp, LayoutChangeEvent } from 'react-native'; export interface ScrollableTabViewProperties extends React.Props { /** @@ -139,7 +140,7 @@ export interface DefaultTabBarProps { } export type RenderTabProperties = - (name: string, pageIndex: number, isTabActive: boolean, goToPage: (pageNumber: number) => void) => JSX.Element; + (name: string, pageIndex: number, isTabActive: boolean, onPressHandler: (pageNumber: number) => void, onLayoutHandler: (event: LayoutChangeEvent) => void) => JSX.Element; export class DefaultTabBar extends React.Component> { } From 946298df2d938e552e1b4e6734021286396b6dfd Mon Sep 17 00:00:00 2001 From: binjiechen Date: Wed, 3 Apr 2019 16:44:45 +0800 Subject: [PATCH 2/4] update onLayoutHandler the optional parameter --- types/react-native-scrollable-tab-view/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index 8e2d227fc0..4cc4d674bb 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -140,7 +140,7 @@ export interface DefaultTabBarProps { } export type RenderTabProperties = - (name: string, pageIndex: number, isTabActive: boolean, onPressHandler: (pageNumber: number) => void, onLayoutHandler: (event: LayoutChangeEvent) => void) => JSX.Element; + (name: string, pageIndex: number, isTabActive: boolean, onPressHandler: (pageNumber: number) => void, onLayoutHandler?: (event: LayoutChangeEvent) => void) => JSX.Element; export class DefaultTabBar extends React.Component> { } From b30cba76ddcc3dc66fe945cae79a44b5687663f2 Mon Sep 17 00:00:00 2001 From: binjiechen Date: Wed, 3 Apr 2019 17:18:54 +0800 Subject: [PATCH 3/4] fix patch version not allowed --- types/react-native-scrollable-tab-view/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index 4cc4d674bb..96ed0e616e 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-native-scrollable-tab-view 0.10.0 +// Type definitions for react-native-scrollable-tab-view 0.8 // Project: https://github.com/brentvatne/react-native-scrollable-tab-view // Definitions by: CaiHuan // Egor Shulga From bc4a889fb993ca9178515596174fbd62ba227556 Mon Sep 17 00:00:00 2001 From: binjiechen Date: Tue, 16 Apr 2019 09:21:23 +0800 Subject: [PATCH 4/4] update version number --- types/react-native-scrollable-tab-view/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index 96ed0e616e..b35e6fe716 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-native-scrollable-tab-view 0.8 +// Type definitions for react-native-scrollable-tab-view 0.10 // Project: https://github.com/brentvatne/react-native-scrollable-tab-view // Definitions by: CaiHuan // Egor Shulga