Text: HostComponent instead of NativeComponent

Summary:
We can use the HostComponent type now instead of NativeComponent

Changelog:
[Internal]

Reviewed By: zackargyle, rickhanlonii

Differential Revision: D18871289

fbshipit-source-id: 3c70369c5848dedfc22ca6f6ccbb69d6d60a1330
This commit is contained in:
Eli White 2019-12-12 14:21:24 -08:00 коммит произвёл Facebook Github Bot
Родитель 294cf84469
Коммит 49e1071e4c
1 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -22,7 +22,7 @@ const nullthrows = require('nullthrows');
const processColor = require('../StyleSheet/processColor');
import type {PressEvent} from '../Types/CoreEventTypes';
import type {NativeComponent} from '../Renderer/shims/ReactNative';
import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
import type {PressRetentionOffset, TextProps} from './TextProps';
type ResponseHandlers = $ReadOnly<{|
@ -291,6 +291,12 @@ TextToExport.displayName = 'Text';
* and run Flow. */
TextToExport.propTypes = DeprecatedTextPropTypes;
module.exports = ((TextToExport: $FlowFixMe): Class<
NativeComponent<TextProps>,
>);
type TextStatics = $ReadOnly<{|
propTypes: typeof DeprecatedTextPropTypes,
|}>;
module.exports = ((TextToExport: any): React.AbstractComponent<
TextProps,
React.ElementRef<HostComponent<TextProps>>,
> &
TextStatics);