From d8d74cffbd6cbf89a76fcc124931ce1c37729e6b Mon Sep 17 00:00:00 2001 From: Vladimir Timofeev Date: Sat, 1 Feb 2020 14:15:45 +0300 Subject: [PATCH] [react-native] Fix Picker component definitions + test (#42024) * add test to show the problem * make it work --- types/react-native/index.d.ts | 2 +- types/react-native/test/index.tsx | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 018f009fcc..ebcf6aaeff 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -2994,7 +2994,7 @@ export class Picker extends React.Component { */ static MODE_DROPDOWN: string; - static Item: React.Component; + static Item: React.ComponentType; } /** diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 59c142ecfe..0535b72de2 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -81,6 +81,7 @@ import { Modal, TimePickerAndroid, DatePickerAndroid, + Picker, ViewPropTypes, requireNativeComponent, Keyboard, @@ -898,6 +899,13 @@ const DatePickerAndroidTest = () => { }); } +const PickerTest = () => ( + {}}> + + + +); + class BridgedComponentTest extends React.Component { static propTypes = { jsProp: PropTypes.string.isRequired,