Flow strict in DatePickerAndroid.android.js, DatePickerAndroid.ios.js (#22106)

Summary:
Related to #22100

Turn Flow strict mode on for DatePickerAndroid

- [x] npm run prettier
- [ ] npm run flow-check-ios
- [ ] npm run flow-check-android

This error was happend #22101 #22048

[GENERAL] [ENHANCEMENT] [Components/DatePickerAndroid/DatePickerAndroid.android.js] - Flow strict mode
[GENERAL] [ENHANCEMENT] [Components/DatePickerAndroid/DatePickerAndroid.ios.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22106

Reviewed By: TheSavior

Differential Revision: D12919276

Pulled By: RSNara

fbshipit-source-id: 79672b2894435ca3c9988fefee3685700a8d8936
This commit is contained in:
nd-02110114
2018-12-26 12:00:56 -08:00
committed by Facebook Github Bot
parent 19d69f9c22
commit 60f3b53cef
2 changed files with 35 additions and 11 deletions

View File

@@ -5,13 +5,20 @@
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @flow strict-local
*/
'use strict';
type Options = $ReadOnly<{|
date?: ?(Date | number),
minDate?: ?(Date | number),
maxDate?: ?(Date | number),
mode?: ?('calender' | 'spinner' | 'default'),
|}>;
const DatePickerAndroid = {
async open(options: Object): Promise<Object> {
async open(options: Options): Promise<void> {
return Promise.reject({
message: 'DatePickerAndroid is not supported on this platform.',
});