2
2
createElement ,
3
3
ReactElement ,
4
4
ReactNode ,
5
- ReactType ,
5
+ ElementType ,
6
6
ReactHTML ,
7
7
Attributes ,
8
8
} from 'react' ;
@@ -18,7 +18,7 @@ type PropsLike<P> = P & PropsExtensions & Attributes;
18
18
type Children = string | Array < ReactNode > ;
19
19
20
20
function createElementSpreading < P = any > (
21
- type : ReactType < P > | keyof ReactHTML ,
21
+ type : ElementType < P > | keyof ReactHTML ,
22
22
props : PropsLike < P > | null ,
23
23
children : Children ,
24
24
) : ReactElement < P > {
@@ -30,7 +30,7 @@ function createElementSpreading<P = any>(
30
30
}
31
31
32
32
function hyperscriptProps < P = any > (
33
- type : ReactType < P > | keyof ReactHTML ,
33
+ type : ElementType < P > | keyof ReactHTML ,
34
34
props : PropsLike < P > ,
35
35
) : ReactElement < P > {
36
36
if ( ! props . sel && ! hasModuleProps ( props ) ) {
@@ -41,14 +41,14 @@ function hyperscriptProps<P = any>(
41
41
}
42
42
43
43
function hyperscriptChildren < P = any > (
44
- type : ReactType < P > | keyof ReactHTML ,
44
+ type : ElementType < P > | keyof ReactHTML ,
45
45
children : Children ,
46
46
) : ReactElement < P > {
47
47
return createElementSpreading ( type , null , children ) ;
48
48
}
49
49
50
50
function hyperscriptPropsChildren < P = any > (
51
- type : ReactType < P > | keyof ReactHTML ,
51
+ type : ElementType < P > | keyof ReactHTML ,
52
52
props : PropsLike < P > ,
53
53
children : Children ,
54
54
) : ReactElement < P > {
@@ -60,7 +60,7 @@ function hyperscriptPropsChildren<P = any>(
60
60
}
61
61
62
62
export function h < P = any > (
63
- type : ReactType < P > | keyof ReactHTML ,
63
+ type : ElementType < P > | keyof ReactHTML ,
64
64
a ?: PropsLike < P > | Children ,
65
65
b ?: Children ,
66
66
) : ReactElement < P > {
0 commit comments