Remove type union in PickeriOS/PickerNativeComponent

Summary:
This builds on the last diff to remove type a type union from Picker. This diff focuses on Picker internals.

Changelog: [JS] Remove type union in PickeriOS/PickerNativeComponent

Reviewed By: sammy-SC

Differential Revision: D24254615

fbshipit-source-id: f788a2e123135c1e8b9909870c40f53b2dea0227
This commit is contained in:
Peter Argany 2020-10-13 11:13:34 -07:00 коммит произвёл Facebook GitHub Bot
Родитель b05d90e8bb
Коммит 3113e47b9b
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -37,7 +37,7 @@ type PickerIOSChangeEvent = SyntheticEvent<
type RCTPickerIOSItemType = $ReadOnly<{|
label: ?Label,
value: ?(number | string),
value: ?string,
textColor: ?ProcessedColorValue,
|}>;
@ -49,7 +49,7 @@ type Props = $ReadOnly<{|
itemStyle?: ?TextStyleProp,
onChange?: ?(event: PickerIOSChangeEvent) => mixed,
onValueChange?: ?(itemValue: string | number, itemIndex: number) => mixed,
selectedValue: ?(number | string),
selectedValue: ?string,
accessibilityLabel?: ?string,
|}>;
@ -60,7 +60,7 @@ type State = {|
type ItemProps = $ReadOnly<{|
label: ?Label,
value?: ?(number | string),
value?: ?string,
color?: ?ColorValue,
|}>;

Просмотреть файл

@ -28,7 +28,7 @@ type PickerIOSChangeEvent = SyntheticEvent<
type RCTPickerIOSItemType = $ReadOnly<{|
label: ?Label,
value: ?(number | string),
value: ?string,
textColor: ?ProcessedColorValue,
|}>;