import { Key, VNode, VNodeData } from "./vnode.js"; import { ArrayOrElement } from "./h.js"; import { Props } from "./modules/props.js"; export type JsxVNodeChild = VNode | string | number | boolean | undefined | null; export type JsxVNodeChildren = ArrayOrElement; export type FunctionComponent = (props: { [prop: string]: any; } | null, children?: VNode[]) => VNode; export declare function Fragment(data: { key?: Key; } | null, ...children: JsxVNodeChildren[]): VNode; /** * jsx/tsx compatible factory function * see: https://www.typescriptlang.org/docs/handbook/jsx.html#factory-functions */ export declare function jsx(tag: string | FunctionComponent, data: VNodeData | null, ...children: JsxVNodeChildren[]): VNode; export declare namespace jsx { type Element = VNode; type IfEquals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? Output : never; type WritableKeys = { [P in keyof T]-?: IfEquals<{ [Q in P]: T[P]; }, { -readonly [Q in P]: T[P]; }, P>; }[keyof T]; type ElementProperties = { [Property in WritableKeys as T[Property] extends string | number | null | undefined ? Property : never]?: T[Property]; }; type VNodeProps = ElementProperties & Props; type HtmlElements = { [Property in keyof HTMLElementTagNameMap]: VNodeData>; }; interface IntrinsicElements extends HtmlElements { [elemName: string]: VNodeData; } }