|
|
@ -98,6 +98,7 @@ export class JSX { |
|
|
|
} |
|
|
|
|
|
|
|
static createElement<T>(fn: (props: T) => HtmlEnt, props: T, ...content: Content[]): HtmlEnt; |
|
|
|
static createElement(name: string, props: ElemProps, ...content: Content[]): HtmlEnt; |
|
|
|
static createElement<P, T extends JSXName<P>>(name: T, arg: T extends 'string' ? ElemProps : P, ...content: Content[]): HtmlEnt { |
|
|
|
if (typeof name !== 'string') { |
|
|
|
return name(arg); |
|
|
|