From 6310159eb6ce25ab5e51454cfde70bdc17774d3a Mon Sep 17 00:00:00 2001 From: paranoidjk Date: Fri, 21 Jul 2017 10:42:43 +0800 Subject: [PATCH] fix(ReactNative): ScrollView.props.style definition error --- types/react-native/index.d.ts | 2 +- types/react-native/test/index.tsx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index e8e9eca55c..f2e5c8127b 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -6065,7 +6065,7 @@ export interface ScrollViewProperties extends ViewProperties, ScrollViewProperti /** * Style */ - style?: ScrollViewStyle | Array + style?: StyleProp /** * A RefreshControl component, used to provide pull-to-refresh diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 954402f23c..5cf036d433 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -244,6 +244,14 @@ export class CapsLockComponent extends React.Component { class ScrollerListComponentTest extends React.Component<{}, { dataSource: ListViewDataSource}> { render() { + const scrollViewStyle1 = StyleSheet.create({ + scrollView: { + backgroundColor: 'red', + }, + }); + const scrollViewStyle2 = { + flex: 1 + }; return ( { @@ -251,7 +259,7 @@ class ScrollerListComponentTest extends React.Component<{}, { dataSource: ListVi throw new Error("Expected scroll to be enabled.") } - return + return }} renderRow={({ type, data }, _, row: number) => { return Filler