@@ -2,22 +2,23 @@ import {
22 createElement ,
33 ReactElement ,
44 ReactNode ,
5- ReactType ,
5+ ElementType ,
66 ReactHTML ,
77 Attributes ,
88} from 'react' ;
99import { incorporate } from './incorporate' ;
1010
1111export type PropsExtensions = {
1212 sel ?: string | symbol ;
13+ domProps ?: any
1314} ;
1415
1516type PropsLike < P > = P & PropsExtensions & Attributes ;
1617
1718type Children = string | Array < ReactNode > ;
1819
1920function createElementSpreading < P = any > (
20- type : ReactType < P > | keyof ReactHTML ,
21+ type : ElementType < P > | keyof ReactHTML ,
2122 props : PropsLike < P > | null ,
2223 children : Children ,
2324) : ReactElement < P > {
@@ -29,7 +30,7 @@ function createElementSpreading<P = any>(
2930}
3031
3132function hyperscriptProps < P = any > (
32- type : ReactType < P > | keyof ReactHTML ,
33+ type : ElementType < P > | keyof ReactHTML ,
3334 props : PropsLike < P > ,
3435) : ReactElement < P > {
3536 if ( ! props . sel ) {
@@ -40,14 +41,14 @@ function hyperscriptProps<P = any>(
4041}
4142
4243function hyperscriptChildren < P = any > (
43- type : ReactType < P > | keyof ReactHTML ,
44+ type : ElementType < P > | keyof ReactHTML ,
4445 children : Children ,
4546) : ReactElement < P > {
4647 return createElementSpreading ( type , null , children ) ;
4748}
4849
4950function hyperscriptPropsChildren < P = any > (
50- type : ReactType < P > | keyof ReactHTML ,
51+ type : ElementType < P > | keyof ReactHTML ,
5152 props : PropsLike < P > ,
5253 children : Children ,
5354) : ReactElement < P > {
@@ -59,7 +60,7 @@ function hyperscriptPropsChildren<P = any>(
5960}
6061
6162export function h < P = any > (
62- type : ReactType < P > | keyof ReactHTML ,
63+ type : ElementType < P > | keyof ReactHTML ,
6364 a ?: PropsLike < P > | Children ,
6465 b ?: Children ,
6566) : ReactElement < P > {
0 commit comments