From 4dd39e15ba104e653ab44a3ff30e5ae988765524 Mon Sep 17 00:00:00 2001 From: nd-02110114 Date: Tue, 27 Nov 2018 17:09:20 -0800 Subject: [PATCH] Flow strict in Picker.js, PickerIOS.ios.js, PickerAndroid.android.js (#22128) Summary: Related to #22100 Turn Flow strict mode on for Picker - [x] npm run prettier - [x] npm run flow-check-ios - [x] npm run flow-check-android Pull Request resolved: https://github.com/facebook/react-native/pull/22128 Differential Revision: D12946781 Pulled By: mmmulani fbshipit-source-id: 4d3cb884dd8bf57a43ef8aec4491359e9874d182 --- js/PermissionsExampleAndroid.android.js | 2 +- js/PickerExample.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/PermissionsExampleAndroid.android.js b/js/PermissionsExampleAndroid.android.js index b624514114c..93a7451809b 100644 --- a/js/PermissionsExampleAndroid.android.js +++ b/js/PermissionsExampleAndroid.android.js @@ -76,7 +76,7 @@ class PermissionsExample extends React.Component<{}, $FlowFixMeState> { ); } - _onSelectPermission = (permission: string) => { + _onSelectPermission = (permission: string | number) => { this.setState({ permission: permission, }); diff --git a/js/PickerExample.js b/js/PickerExample.js index ad234e5ebe8..4957916a4a8 100644 --- a/js/PickerExample.js +++ b/js/PickerExample.js @@ -116,7 +116,7 @@ class PickerExample extends React.Component<{}, $FlowFixMeState> { this.setState({mode: newMode}); }; - onValueChange = (key: string, value: string) => { + onValueChange = (key: string, value: string | number) => { const newState = {}; newState[key] = value; this.setState(newState);