File tree 19 files changed +39
-41
lines changed
packages/react-native-codegen/e2e/__test_fixtures__/components
19 files changed +39
-41
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,8 @@ import type {
19
19
Float ,
20
20
} from 'react-native/Libraries/Types/CodegenTypes' ;
21
21
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands' ;
22
- import codegenNativeComponent , {
23
- type NativeComponentType ,
24
- } from 'react-native/Libraries/Utilities/codegenNativeComponent' ;
22
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent' ;
23
+ import type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes' ;
25
24
import * as React from 'react' ;
26
25
27
26
type DrawerStateEvent = $ReadOnly < { |
@@ -110,7 +109,7 @@ type NativeProps = $ReadOnly<{|
110
109
statusBarBackgroundColor ?: ?ColorValue ,
111
110
| } > ;
112
111
113
- type NativeType = NativeComponentType < NativeProps > ;
112
+ type NativeType = HostComponent < NativeProps > ;
114
113
115
114
interface NativeCommands {
116
115
+ openDrawer : ( viewRef : React . ElementRef < NativeType > ) => void ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import type {
16
16
} from 'react-native/Libraries/Types/CodegenTypes' ;
17
17
18
18
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent' ;
19
- import type { NativeComponentType } from 'react-native/Libraries/Utilities/codegenNativeComponent ' ;
19
+ import type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes ' ;
20
20
21
21
import type { ColorValue } from '../../StyleSheet/StyleSheetTypes' ;
22
22
import type { ViewProps } from '../View/ViewPropTypes' ;
@@ -45,4 +45,4 @@ type NativeProps = $ReadOnly<{|
45
45
46
46
export default ( codegenNativeComponent < NativeProps > (
47
47
'AndroidSwitch' ,
48
- ) : NativeComponentType < NativeProps > ) ;
48
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 11
11
'use strict' ;
12
12
13
13
import codegenNativeComponent from '../Utilities/codegenNativeComponent' ;
14
- import { type NativeComponentType } from '../Utilities/codegenNativeComponent ' ;
14
+ import type { HostComponent } from '../Renderer/shims/ReactNativeTypes ' ;
15
15
import type {
16
16
WithDefault ,
17
- BubblingEventHandler ,
18
17
DirectEventHandler ,
19
18
Int32 ,
20
19
} from '../Types/CodegenTypes' ;
@@ -116,4 +115,4 @@ type NativeProps = $ReadOnly<{|
116
115
export default ( codegenNativeComponent < NativeProps > ( 'ModalHostView' , {
117
116
interfaceOnly : true ,
118
117
paperComponentName : 'RCTModalHostView' ,
119
- } ) : NativeComponentType < NativeProps > ) ;
118
+ } ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import type {
23
23
} from '../../../../../Libraries/Types/CodegenTypes' ;
24
24
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
25
25
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
26
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
26
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
27
27
28
28
type NativeProps = $ReadOnly < { |
29
29
...ViewProps ,
@@ -43,4 +43,4 @@ type NativeProps = $ReadOnly<{|
43
43
44
44
export default ( codegenNativeComponent < NativeProps > (
45
45
'ArrayPropsNativeComponentView' ,
46
- ) : NativeComponentType < NativeProps > ) ;
46
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 13
13
import type { WithDefault } from '../../../../../Libraries/Types/CodegenTypes' ;
14
14
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
15
15
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
16
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
16
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
17
17
18
18
type NativeProps = $ReadOnly < { |
19
19
...ViewProps ,
@@ -25,4 +25,4 @@ type NativeProps = $ReadOnly<{|
25
25
26
26
export default ( codegenNativeComponent < NativeProps > (
27
27
'BooleanPropNativeComponentView' ,
28
- ) : NativeComponentType < NativeProps > ) ;
28
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 13
13
import type { ColorValue } from '../../../../../Libraries/StyleSheet/StyleSheetTypes' ;
14
14
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
15
15
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
16
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
16
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
17
17
18
18
type NativeProps = $ReadOnly < { |
19
19
...ViewProps ,
@@ -24,4 +24,4 @@ type NativeProps = $ReadOnly<{|
24
24
25
25
export default ( codegenNativeComponent < NativeProps > (
26
26
'ColorPropNativeComponentView' ,
27
- ) : NativeComponentType < NativeProps > ) ;
27
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 13
13
import type { EdgeInsetsValue } from '../../../../../Libraries/StyleSheet/StyleSheetTypes' ;
14
14
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
15
15
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
16
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
16
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
17
17
18
18
type NativeProps = $ReadOnly < { |
19
19
...ViewProps ,
@@ -24,4 +24,4 @@ type NativeProps = $ReadOnly<{|
24
24
25
25
export default ( codegenNativeComponent < NativeProps > (
26
26
'EdgeInsetsPropNativeComponentView' ,
27
- ) : NativeComponentType < NativeProps > ) ;
27
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 13
13
import type { WithDefault } from '../../../../../Libraries/Types/CodegenTypes' ;
14
14
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
15
15
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
16
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
16
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
17
17
18
18
type NativeProps = $ReadOnly < { |
19
19
...ViewProps ,
@@ -25,4 +25,4 @@ type NativeProps = $ReadOnly<{|
25
25
26
26
export default ( codegenNativeComponent < NativeProps > (
27
27
'EnumPropNativeComponentView' ,
28
- ) : NativeComponentType < NativeProps > ) ;
28
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import type {
17
17
} from '../../../../../Libraries/Types/CodegenTypes' ;
18
18
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
19
19
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
20
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
20
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
21
21
22
22
type OnChangeEvent = $ReadOnly < { |
23
23
location : {
@@ -41,4 +41,4 @@ type NativeProps = $ReadOnly<{|
41
41
42
42
export default ( codegenNativeComponent < NativeProps > (
43
43
'EventNestedObjectPropsNativeComponentView' ,
44
- ) : NativeComponentType < NativeProps > ) ;
44
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import type {
19
19
} from '../../../../../Libraries/Types/CodegenTypes' ;
20
20
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
21
21
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
22
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
22
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
23
23
24
24
type OnChangeEvent = $ReadOnly < { |
25
25
value : boolean ,
@@ -62,4 +62,4 @@ type NativeProps = $ReadOnly<{|
62
62
63
63
export default ( codegenNativeComponent < NativeProps > (
64
64
'EventPropsNativeComponentView' ,
65
- ) : NativeComponentType < NativeProps > ) ;
65
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import type {
16
16
} from '../../../../../Libraries/Types/CodegenTypes' ;
17
17
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
18
18
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
19
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
19
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
20
20
21
21
type NativeProps = $ReadOnly < { |
22
22
...ViewProps ,
@@ -33,4 +33,4 @@ type NativeProps = $ReadOnly<{|
33
33
34
34
export default ( codegenNativeComponent < NativeProps > (
35
35
'FloatPropsNativeComponentView' ,
36
- ) : NativeComponentType < NativeProps > ) ;
36
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 13
13
import type { ImageSource } from '../../../../../Libraries/Image/ImageSource' ;
14
14
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
15
15
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
16
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
16
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
17
17
18
18
type NativeProps = $ReadOnly < { |
19
19
...ViewProps ,
@@ -24,4 +24,4 @@ type NativeProps = $ReadOnly<{|
24
24
25
25
export default ( codegenNativeComponent < NativeProps > (
26
26
'ImagePropNativeComponentView' ,
27
- ) : NativeComponentType < NativeProps > ) ;
27
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import type {
16
16
} from '../../../../../Libraries/Types/CodegenTypes' ;
17
17
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
18
18
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
19
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
19
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
20
20
21
21
type NativeProps = $ReadOnly < { |
22
22
...ViewProps ,
@@ -29,4 +29,4 @@ type NativeProps = $ReadOnly<{|
29
29
30
30
export default ( codegenNativeComponent < NativeProps > (
31
31
'IntegerPropNativeComponentView' ,
32
- ) : NativeComponentType < NativeProps > ) ;
32
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import type {
16
16
} from '../../../../../Libraries/Types/CodegenTypes' ;
17
17
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
18
18
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
19
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
19
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
20
20
21
21
type NativeProps = $ReadOnly < { |
22
22
...ViewProps ,
@@ -34,4 +34,4 @@ export default (codegenNativeComponent<NativeProps>(
34
34
interfaceOnly : true ,
35
35
paperComponentName : 'RCTInterfaceOnlyComponent' ,
36
36
} ,
37
- ) : NativeComponentType < NativeProps > ) ;
37
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import type {
17
17
import type { ImageSource } from '../../../../../Libraries/Image/ImageSource' ;
18
18
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
19
19
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
20
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
20
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
21
21
22
22
type NativeProps = $ReadOnly < { |
23
23
...ViewProps ,
@@ -31,4 +31,4 @@ type NativeProps = $ReadOnly<{|
31
31
32
32
export default ( codegenNativeComponent < NativeProps > (
33
33
'MultiNativePropNativeComponentView' ,
34
- ) : NativeComponentType < NativeProps > ) ;
34
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 12
12
13
13
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
14
14
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
15
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
15
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
16
16
17
17
type NativeProps = $ReadOnly < { |
18
18
...ViewProps ,
@@ -22,4 +22,4 @@ type NativeProps = $ReadOnly<{|
22
22
23
23
export default ( codegenNativeComponent < NativeProps > (
24
24
'NoPropsNoEventsNativeComponentView' ,
25
- ) : NativeComponentType < NativeProps > ) ;
25
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import type {
22
22
WithDefault ,
23
23
} from '../../../../../Libraries/Types/CodegenTypes' ;
24
24
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
25
- import type { NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
25
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
26
26
27
27
type ObjectArrayPropType = $ReadOnly < { |
28
28
array : $ReadOnlyArray < string > ,
@@ -50,4 +50,4 @@ type NativeProps = $ReadOnly<{|
50
50
51
51
export default ( codegenNativeComponent < NativeProps > (
52
52
'ObjectPropsNativeComponent' ,
53
- ) : NativeComponentType < NativeProps > ) ;
53
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 13
13
import type { PointValue } from '../../../../../Libraries/StyleSheet/StyleSheetTypes' ;
14
14
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
15
15
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
16
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
16
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
17
17
18
18
type NativeProps = $ReadOnly < { |
19
19
...ViewProps ,
@@ -24,4 +24,4 @@ type NativeProps = $ReadOnly<{|
24
24
25
25
export default ( codegenNativeComponent < NativeProps > (
26
26
'PointPropNativeComponentView' ,
27
- ) : NativeComponentType < NativeProps > ) ;
27
+ ) : HostComponent < NativeProps > ) ;
Original file line number Diff line number Diff line change 13
13
import type { WithDefault } from '../../../../../Libraries/Types/CodegenTypes' ;
14
14
import type { ViewProps } from '../../../../../Libraries/Components/View/ViewPropTypes' ;
15
15
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent' ;
16
- import { type NativeComponentType } from '../../../../../Libraries/Utilities/codegenNativeComponent ' ;
16
+ import type { HostComponent } from '../../../../../Libraries/Renderer/shims/ReactNativeTypes ' ;
17
17
18
18
type NativeProps = $ReadOnly < { |
19
19
...ViewProps ,
@@ -25,4 +25,4 @@ type NativeProps = $ReadOnly<{|
25
25
26
26
export default ( codegenNativeComponent < NativeProps > (
27
27
'StringPropNativeComponentView' ,
28
- ) : NativeComponentType < NativeProps > ) ;
28
+ ) : HostComponent < NativeProps > ) ;
You can’t perform that action at this time.
0 commit comments