From 1b4eaeb184aa46a752a06d941807a7cf8e87f13e Mon Sep 17 00:00:00 2001 From: Eli White Date: Wed, 25 Sep 2019 11:42:07 -0700 Subject: [PATCH] Migrate NativeComponentType from codegenNativeComponent to HostComponent #1 Summary: We need to migrate to HostComponent, this is the first batch. Changelog: [Internal] Migrate NativeComponentType from codegenNativeComponent to HostComponent Reviewed By: rickhanlonii Differential Revision: D17562879 fbshipit-source-id: ce1993b64a79cede3598c89ddff0dadf07fde92f --- .../ActivityIndicator/ActivityIndicatorViewNativeComponent.js | 4 ++-- .../Components/MaskedView/RCTMaskedViewNativeComponent.js | 4 ++-- .../ProgressBarAndroid/ProgressBarAndroidNativeComponent.js | 4 ++-- .../ProgressViewIOS/RCTProgressViewNativeComponent.js | 4 ++-- .../AndroidSwipeRefreshLayoutNativeComponent.js | 4 ++-- .../RefreshControl/PullToRefreshViewNativeComponent.js | 4 ++-- .../Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js | 4 ++-- .../SegmentedControlIOS/RCTSegmentedControlNativeComponent.js | 4 ++-- Libraries/Components/Slider/SliderNativeComponent.js | 4 ++-- Libraries/Components/Switch/SwitchNativeComponent.js | 4 ++-- .../TextInput/RCTInputAccessoryViewNativeComponent.js | 4 ++-- .../UnimplementedNativeViewNativeComponent.js | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js b/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js index 487f76d6196bcc..e3500e8cf75451 100644 --- a/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +++ b/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js @@ -16,7 +16,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ViewProps} from '../View/ViewPropTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -53,4 +53,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent('ActivityIndicatorView', { paperComponentName: 'RCTActivityIndicatorView', -}): NativeComponentType); +}): HostComponent); diff --git a/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js b/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js index f9c3de50ccdad1..6841c36b8cb780 100644 --- a/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js +++ b/Libraries/Components/MaskedView/RCTMaskedViewNativeComponent.js @@ -10,7 +10,7 @@ import type {ViewProps} from '../View/ViewPropTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -18,4 +18,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent( 'RCTMaskedView', -): NativeComponentType); +): HostComponent); diff --git a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js index 4ed47171547aed..4e28a0274db74b 100644 --- a/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +++ b/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js @@ -15,7 +15,7 @@ import type {ViewProps} from '../View/ViewPropTypes'; import type {Double, WithDefault} from '../../Types/CodegenTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -32,4 +32,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent( 'AndroidProgressBar', -): NativeComponentType); +): HostComponent); diff --git a/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js b/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js index 42b436d2a70f62..a5e415381b03a3 100644 --- a/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +++ b/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js @@ -16,7 +16,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ViewProps} from '../View/ViewPropTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -32,4 +32,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent( 'RCTProgressView', -): NativeComponentType); +): HostComponent); diff --git a/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js b/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js index fc6278bcf8de62..e502bf62ddb027 100644 --- a/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +++ b/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js @@ -11,7 +11,7 @@ 'use strict'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; import type { DirectEventHandler, @@ -67,4 +67,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent( 'AndroidSwipeRefreshLayout', -): NativeComponentType); +): HostComponent); diff --git a/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js b/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js index 24db172eb0c68f..44ee3de85fd9b4 100644 --- a/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +++ b/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js @@ -15,7 +15,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ViewProps} from '../View/ViewPropTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -46,4 +46,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent('PullToRefreshView', { paperComponentName: 'RCTRefreshControl', -}): NativeComponentType); +}): HostComponent); diff --git a/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js b/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js index bbf4c52307b768..1c3e9e7e823138 100644 --- a/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +++ b/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js @@ -14,7 +14,7 @@ import type {ViewProps} from '../View/ViewPropTypes'; import type {WithDefault} from '../../Types/CodegenTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -25,4 +25,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent( 'RCTSafeAreaView', -): NativeComponentType); +): HostComponent); diff --git a/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js b/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js index 4d45a02b363377..9c7eefdd85f721 100644 --- a/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js +++ b/Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js @@ -10,7 +10,7 @@ 'use strict'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; import type {ViewProps} from '../View/ViewPropTypes'; import type { BubblingEventHandler, @@ -40,4 +40,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent( 'RCTSegmentedControl', -): NativeComponentType); +): HostComponent); diff --git a/Libraries/Components/Slider/SliderNativeComponent.js b/Libraries/Components/Slider/SliderNativeComponent.js index a30b4b6da6e549..dce9d7097e05aa 100644 --- a/Libraries/Components/Slider/SliderNativeComponent.js +++ b/Libraries/Components/Slider/SliderNativeComponent.js @@ -18,7 +18,7 @@ import type { } from '../../Types/CodegenTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ImageSource} from '../../Image/ImageSource'; @@ -57,4 +57,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent('Slider', { interfaceOnly: true, paperComponentName: 'RCTSlider', -}): NativeComponentType); +}): HostComponent); diff --git a/Libraries/Components/Switch/SwitchNativeComponent.js b/Libraries/Components/Switch/SwitchNativeComponent.js index 7aa7a684ebdbd0..13ac5b46d2ca73 100644 --- a/Libraries/Components/Switch/SwitchNativeComponent.js +++ b/Libraries/Components/Switch/SwitchNativeComponent.js @@ -15,7 +15,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ViewProps} from '../View/ViewPropTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type SwitchChangeEvent = $ReadOnly<{| value: boolean, @@ -42,4 +42,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent('Switch', { paperComponentName: 'RCTSwitch', -}): NativeComponentType); +}): HostComponent); diff --git a/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js b/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js index 152615a45e799e..d76286da1a4f5c 100644 --- a/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +++ b/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js @@ -13,7 +13,7 @@ import type {ColorValue} from '../../StyleSheet/StyleSheetTypes'; import type {ViewProps} from '../View/ViewPropTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -22,4 +22,4 @@ type NativeProps = $ReadOnly<{| export default (codegenNativeComponent( 'RCTInputAccessoryView', -): NativeComponentType); +): HostComponent); diff --git a/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js b/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js index cea9d45a2020e5..640d7e660272df 100644 --- a/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +++ b/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js @@ -14,7 +14,7 @@ import type {WithDefault} from '../../Types/CodegenTypes'; import type {ViewProps} from '../View/ViewPropTypes'; import codegenNativeComponent from '../../Utilities/codegenNativeComponent'; -import {type NativeComponentType} from '../../Utilities/codegenNativeComponent'; +import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes'; type NativeProps = $ReadOnly<{| ...ViewProps, @@ -25,4 +25,4 @@ type NativeProps = $ReadOnly<{| // Do not require this file in paper builds export default (codegenNativeComponent( 'UnimplementedNativeView', -): NativeComponentType); +): HostComponent);