Core: Remove any from calls to requireNativeComponent

Summary:
These were being cast to a NativeComponent but that is no longer accurate. `requireNativeComponent` returns the type of `HostComponent` now which is more accurate. We don't need the cast through `any` anymore.

In order to know that I found all the callsites, I ran this command to find these:
```
grep -r "requireNativeComponent" react-native-github -C 5 | grep 'any'
```

Changelog:
[Internal]

Reviewed By: cpojer

Differential Revision: D17864165

fbshipit-source-id: 3774d6d47d7bb0d885cc1a1352f81fec7d3bca0d
This commit is contained in:
Eli White
2019-10-14 13:53:48 -07:00
committed by Facebook Github Bot
parent 9f71551167
commit e640637928
8 changed files with 44 additions and 56 deletions
@@ -19,7 +19,7 @@ import type {
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import type {NativeComponent} from '../../Renderer/shims/ReactNative';
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
import type {TextStyleProp, ViewStyleProp} from '../../StyleSheet/StyleSheet';
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
import {requireNativeComponent} from 'react-native';
@@ -534,8 +534,8 @@ export type NativeProps = $ReadOnly<{|
text?: ?string,
|}>;
type AndroidTextInputComponentType = Class<NativeComponent<NativeProps>>;
export default ((requireNativeComponent(
const AndroidTextInputNativeComponent: HostComponent<NativeProps> = requireNativeComponent<NativeProps>(
'AndroidTextInput',
): any): AndroidTextInputComponentType);
);
export default AndroidTextInputNativeComponent;