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: https://github.com/facebook/react-native/pull/22105 Differential Revision: D12920939 Pulled By: TheSavior fbshipit-source-id: aae5ca04d656abb1cf34168e12e44dd50f0a603c
This commit is contained in:
parent
7b10a028ca
commit
3c0211b61a
|
@ -8,7 +8,7 @@
|
||||||
* This is a controlled component version of RCTDatePickerIOS
|
* This is a controlled component version of RCTDatePickerIOS
|
||||||
*
|
*
|
||||||
* @format
|
* @format
|
||||||
* @flow
|
* @flow strict-local
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -21,10 +21,15 @@ const View = require('View');
|
||||||
const requireNativeComponent = require('requireNativeComponent');
|
const requireNativeComponent = require('requireNativeComponent');
|
||||||
|
|
||||||
import type {ViewProps} from 'ViewPropTypes';
|
import type {ViewProps} from 'ViewPropTypes';
|
||||||
|
import type {SyntheticEvent} from 'CoreEventTypes';
|
||||||
|
|
||||||
const RCTDatePickerIOS = requireNativeComponent('RCTDatePicker');
|
const RCTDatePickerIOS = requireNativeComponent('RCTDatePicker');
|
||||||
|
|
||||||
type Event = Object;
|
type Event = SyntheticEvent<
|
||||||
|
$ReadOnly<{|
|
||||||
|
timestamp: number,
|
||||||
|
|}>,
|
||||||
|
>;
|
||||||
|
|
||||||
type Props = $ReadOnly<{|
|
type Props = $ReadOnly<{|
|
||||||
...ViewProps,
|
...ViewProps,
|
||||||
|
@ -154,7 +159,11 @@ class DatePickerIOS extends React.Component<Props> {
|
||||||
? props.initialDate.getTime()
|
? props.initialDate.getTime()
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
locale={props.locale ? props.locale : undefined}
|
locale={
|
||||||
|
props.locale != null && props.locale !== ''
|
||||||
|
? props.locale
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
maximumDate={
|
maximumDate={
|
||||||
props.maximumDate ? props.maximumDate.getTime() : undefined
|
props.maximumDate ? props.maximumDate.getTime() : undefined
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue