Make TextInput event prop types less strict (#22673)

Summary:
Similar to what was done here https://github.com/facebook/react-native/pull/22376

This allows using things like async functions with text input event props.

Changelog:
----------

[General] [Fixed] - Make TextInput event prop types less strict

Pull Request resolved: https://github.com/facebook/react-native/pull/22673

Reviewed By: TheSavior

Differential Revision: D13492029

Pulled By: hramos

fbshipit-source-id: 84e1a776a7ac1ae7567fbf4105b2be9be330610e
This commit is contained in:
Janic Duplessis 2018-12-17 17:23:55 -08:00 committed by Facebook Github Bot
parent d162217609
commit c3caca9210

View File

@ -247,17 +247,17 @@ type Props = $ReadOnly<{|
returnKeyType?: ?ReturnKeyType,
maxLength?: ?number,
multiline?: ?boolean,
onBlur?: ?(e: BlurEvent) => void,
onFocus?: ?(e: FocusEvent) => void,
onChange?: ?(e: ChangeEvent) => void,
onChangeText?: ?(text: string) => void,
onContentSizeChange?: ?(e: ContentSizeChangeEvent) => void,
onTextInput?: ?(e: TextInputEvent) => void,
onEndEditing?: ?(e: EditingEvent) => void,
onSelectionChange?: ?(e: SelectionChangeEvent) => void,
onSubmitEditing?: ?(e: EditingEvent) => void,
onKeyPress?: ?(e: KeyPressEvent) => void,
onScroll?: ?(e: ScrollEvent) => void,
onBlur?: ?(e: BlurEvent) => mixed,
onFocus?: ?(e: FocusEvent) => mixed,
onChange?: ?(e: ChangeEvent) => mixed,
onChangeText?: ?(text: string) => mixed,
onContentSizeChange?: ?(e: ContentSizeChangeEvent) => mixed,
onTextInput?: ?(e: TextInputEvent) => mixed,
onEndEditing?: ?(e: EditingEvent) => mixed,
onSelectionChange?: ?(e: SelectionChangeEvent) => mixed,
onSubmitEditing?: ?(e: EditingEvent) => mixed,
onKeyPress?: ?(e: KeyPressEvent) => mixed,
onScroll?: ?(e: ScrollEvent) => mixed,
placeholder?: ?Stringish,
placeholderTextColor?: ?ColorValue,
secureTextEntry?: ?boolean,