Skip to content

Commit

Permalink
Remove type union in PickeriOS/PickerNativeComponent
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Peter Argany authored and facebook-github-bot committed Oct 13, 2020
1 parent b05d90e commit 3113e47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Libraries/Components/Picker/PickerIOS.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type PickerIOSChangeEvent = SyntheticEvent<

type RCTPickerIOSItemType = $ReadOnly<{|
label: ?Label,
value: ?(number | string),
value: ?string,
textColor: ?ProcessedColorValue,
|}>;

Expand All @@ -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,
|}>;

Expand All @@ -60,7 +60,7 @@ type State = {|

type ItemProps = $ReadOnly<{|
label: ?Label,
value?: ?(number | string),
value?: ?string,
color?: ?ColorValue,
|}>;

Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/Picker/RCTPickerNativeComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type PickerIOSChangeEvent = SyntheticEvent<

type RCTPickerIOSItemType = $ReadOnly<{|
label: ?Label,
value: ?(number | string),
value: ?string,
textColor: ?ProcessedColorValue,
|}>;

Expand Down

0 comments on commit 3113e47

Please sign in to comment.