diff --git a/sigpro.ts b/sigpro.ts index c66da17..4d1ea99 100644 --- a/sigpro.ts +++ b/sigpro.ts @@ -14,6 +14,20 @@ interface EffectFn { _dirty?: boolean; } +type JSXFunction = { +

>( + tag: string, + props: (P & { children?: any }) | null, + ...children: any[] + ): HTMLElement; + +

>( + tag: (props: P, context?: any) => any, + props: (P & { children?: any }) | null, + ...children: any[] + ): any; +}; + type Owner = { cleanups: Set } | null; type Signal = { @@ -546,7 +560,7 @@ export function Mount(component: Component | (() => any), target: string | HTMLE return instance; } -const sigPro = { $, $$, Render, Watch, Tag, If, For, Router, Mount }; +const sigPro = { $, $$, Render, Watch, Tag, h: Tag, If, For, Router, Mount }; if (typeof window !== "undefined") { Object.assign(window, sigPro);