From 070fa8d410939952bc8dd3645cbd5ad85a5529c8 Mon Sep 17 00:00:00 2001 From: David Ernst Date: Tue, 21 Jan 2020 09:48:13 -0800 Subject: [PATCH] [react-native]Picker.style expects TextStyle (#41729) The package itself says it's expecting a `TextStyle`, not a `ViewStyle` (https://github.com/facebook/react-native/blob/84adc85523770ebfee749a020920e0b216cf69f8/Libraries/Components/Picker/Picker.js#L62). Specifically, setting this to `ViewStyle` causes Typescript to complain if you try to set a `color` property, which does in fact work. --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a3a2c397c7..aaed6e2c28 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -2952,7 +2952,7 @@ export interface PickerProps extends PickerPropsIOS, PickerPropsAndroid { */ selectedValue?: any; - style?: StyleProp; + style?: StyleProp; /** * Used to locate this view in end-to-end tests.