diff --git a/Libraries/Text/Text.js b/Libraries/Text/Text.js index 92da79d4490..f523ba80db2 100644 --- a/Libraries/Text/Text.js +++ b/Libraries/Text/Text.js @@ -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, ->); +type TextStatics = $ReadOnly<{| + propTypes: typeof DeprecatedTextPropTypes, +|}>; + +module.exports = ((TextToExport: any): React.AbstractComponent< + TextProps, + React.ElementRef>, +> & + TextStatics);