Migrate NativeComponentType from codegenNativeComponent to HostComponent #2

Summary:
We need to migrate to HostComponent instead of the exported type from codegenNativeComponent which is the same type

Changelog:
[Internal] Migrate NativeComponentType from codegenNativeComponent to HostComponent

Reviewed By: rickhanlonii

Differential Revision: D17563307

fbshipit-source-id: 01c8fea8c67b33bed42ae28ffb8c132be87b9a7a
This commit is contained in:
Eli White
2019-09-25 11:44:38 -07:00
committed by Facebook Github Bot
parent 1b4eaeb184
commit 0676ebf79a
19 changed files with 39 additions and 41 deletions
@@ -19,9 +19,8 @@ import type {
Float,
} from 'react-native/Libraries/Types/CodegenTypes';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
import codegenNativeComponent, {
type NativeComponentType,
} from 'react-native/Libraries/Utilities/codegenNativeComponent';
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
import * as React from 'react';
type DrawerStateEvent = $ReadOnly<{|
@@ -110,7 +109,7 @@ type NativeProps = $ReadOnly<{|
statusBarBackgroundColor?: ?ColorValue,
|}>;
type NativeType = NativeComponentType<NativeProps>;
type NativeType = HostComponent<NativeProps>;
interface NativeCommands {
+openDrawer: (viewRef: React.ElementRef<NativeType>) => void;