2
2
createElement ,
3
3
ReactElement ,
4
4
ReactNode ,
5
- ReactType ,
5
+ ElementType ,
6
6
ReactHTML ,
7
7
Attributes ,
8
8
} from 'react' ;
@@ -29,7 +29,7 @@ type PropsLike<P> = P & PropsExtensions & Attributes;
29
29
type Children = string | Array < ReactNode > ;
30
30
31
31
function createElementSpreading < P = any > (
32
- type : ReactType < P > | keyof ReactHTML ,
32
+ type : ElementType < P > | keyof ReactHTML ,
33
33
props : PropsLike < P > | null ,
34
34
children : Children ,
35
35
) : ReactElement < P > {
@@ -41,7 +41,7 @@ function createElementSpreading<P = any>(
41
41
}
42
42
43
43
function hyperscriptProps < P = any > (
44
- type : ReactType < P > | keyof ReactHTML ,
44
+ type : ElementType < P > | keyof ReactHTML ,
45
45
props : PropsLike < P > ,
46
46
) : ReactElement < P > {
47
47
if ( ! shouldIncorporate ( props ) ) {
@@ -52,14 +52,14 @@ function hyperscriptProps<P = any>(
52
52
}
53
53
54
54
function hyperscriptChildren < P = any > (
55
- type : ReactType < P > | keyof ReactHTML ,
55
+ type : ElementType < P > | keyof ReactHTML ,
56
56
children : Children ,
57
57
) : ReactElement < P > {
58
58
return createElementSpreading ( type , null , children ) ;
59
59
}
60
60
61
61
function hyperscriptPropsChildren < P = any > (
62
- type : ReactType < P > | keyof ReactHTML ,
62
+ type : ElementType < P > | keyof ReactHTML ,
63
63
props : PropsLike < P > ,
64
64
children : Children ,
65
65
) : ReactElement < P > {
@@ -71,7 +71,7 @@ function hyperscriptPropsChildren<P = any>(
71
71
}
72
72
73
73
export function h < P = any > (
74
- type : ReactType < P > | keyof ReactHTML ,
74
+ type : ElementType < P > | keyof ReactHTML ,
75
75
a ?: PropsLike < P > | Children ,
76
76
b ?: Children ,
77
77
) : ReactElement < P > {
0 commit comments