File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as React from "react";
44import { createElement } from "./createElement" ;
55
66export function createComponent < Props extends { } > (
7- componentType : React . ElementType ,
7+ componentType : React . ComponentType < Props > ,
88 options ?: { shouldMemo ?: boolean } ,
99) :
1010 | React . ForwardRefExoticComponent < Props & React . RefAttributes < unknown > >
Original file line number Diff line number Diff line change 11import React from "react" ;
22
33interface CreateElementProps < Props extends { } > {
4- componentType : React . ElementType ;
4+ componentType : React . ComponentType < Props > ;
55 props : Props ;
66}
77
88export function createElement < Props extends { } > ( {
99 componentType,
1010 props,
11- } : CreateElementProps < Props > ) : React . ReactElement <
12- Props ,
13- string | React . JSXElementConstructor < unknown >
14- > {
11+ } : CreateElementProps < Props > ) : React . ReactElement < Props > {
1512 return React . createElement ( componentType , props ) ;
1613}
You can’t perform that action at this time.
0 commit comments