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
This commit is contained in:
Eli White 2019-09-25 11:42:07 -07:00 коммит произвёл Facebook Github Bot
Родитель 89e3f70eab
Коммит 1b4eaeb184
12 изменённых файлов: 24 добавлений и 24 удалений

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

@ -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<NativeProps>('ActivityIndicatorView', {
paperComponentName: 'RCTActivityIndicatorView',
}): NativeComponentType<NativeProps>);
}): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'RCTMaskedView',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'AndroidProgressBar',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'RCTProgressView',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'AndroidSwipeRefreshLayout',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);

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

@ -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<NativeProps>('PullToRefreshView', {
paperComponentName: 'RCTRefreshControl',
}): NativeComponentType<NativeProps>);
}): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'RCTSafeAreaView',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'RCTSegmentedControl',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);

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

@ -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<NativeProps>('Slider', {
interfaceOnly: true,
paperComponentName: 'RCTSlider',
}): NativeComponentType<NativeProps>);
}): HostComponent<NativeProps>);

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

@ -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<NativeProps>('Switch', {
paperComponentName: 'RCTSwitch',
}): NativeComponentType<NativeProps>);
}): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'RCTInputAccessoryView',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);

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

@ -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<NativeProps>(
'UnimplementedNativeView',
): NativeComponentType<NativeProps>);
): HostComponent<NativeProps>);