Permalink
Browse files

Turn Flow strict mode on for DatePickerIOS (#22105)

Summary:
Related to #22100

Turn Flow strict mode on for DatePickerIOS.

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

This error was happend #22101 #22048

[GENERAL] [ENHANCEMENT] [Components/DatePicker/DatePickerIOS.ios.js] - Flow strict mode
Pull Request resolved: #22105

Differential Revision: D12920939

Pulled By: TheSavior

fbshipit-source-id: aae5ca04d656abb1cf34168e12e44dd50f0a603c
  • Loading branch information...
nd-02110114 authored and facebook-github-bot committed Nov 5, 2018
1 parent 7b10a02 commit 3c0211b61a1e723c3aaeba42c61b60bc724a3729
Showing with 12 additions and 3 deletions.
  1. +12 −3 Libraries/Components/DatePicker/DatePickerIOS.ios.js
@@ -8,7 +8,7 @@
* This is a controlled component version of RCTDatePickerIOS
*
* @format
* @flow
* @flow strict-local
*/

'use strict';
@@ -21,10 +21,15 @@ const View = require('View');
const requireNativeComponent = require('requireNativeComponent');

import type {ViewProps} from 'ViewPropTypes';
import type {SyntheticEvent} from 'CoreEventTypes';

const RCTDatePickerIOS = requireNativeComponent('RCTDatePicker');

type Event = Object;
type Event = SyntheticEvent<
$ReadOnly<{|
timestamp: number,
|}>,
>;

type Props = $ReadOnly<{|
...ViewProps,
@@ -154,7 +159,11 @@ class DatePickerIOS extends React.Component<Props> {
? props.initialDate.getTime()
: undefined
}
locale={props.locale ? props.locale : undefined}
locale={
props.locale != null && props.locale !== ''
? props.locale
: undefined
}
maximumDate={
props.maximumDate ? props.maximumDate.getTime() : undefined
}

0 comments on commit 3c0211b

Please sign in to comment.