import { FunctionalComponent, JsxProps } from "./component.js"; import { DomIntrinsicElements, DomProps } from "./dom.js"; import { Children } from "./intrinsic/Fragment.js"; import { Template } from "./template.js"; /** * Creates a template based on the given component type. * * @example * ```tsx * render() { * return createElement("div", { id: "app" }, [ * createElement("h1", {}, "Hello, World!"), * ]); * } * ``` */ export declare const createElement: ((type: K, props?: DomIntrinsicElements[K], children?: Children) => Template) & ((...args: [ type: new () => T, ...({} extends JsxProps ? [props?: JsxProps] : [props: JsxProps]), children?: DomProps["children"] ]) => Template) & (

(...args: [ type: FunctionalComponent

, ...({} extends P ? [props?: P] : [props: P]), ...(P extends { children?: unknown; } ? undefined extends P["children"] ? [children?: P["children"]] : [children: P["children"]] : []) ]) => Template); /** * Shorthand for {@link createElement} with convenience methods for intrinsic * elements. * * @example * ```tsx * render() { * return h.div({ id: "app" }, [ * h.h1({}, "Hello, World!"), * ]); * } * ``` */ export declare const h: typeof createElement & { [K in keyof DomIntrinsicElements]: (props?: DomIntrinsicElements[K], children?: Children) => Template; };