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