jelenjs
Version:
Core runtime library for JelenJS - an experimental UI framework with fine-grained reactivity
19 lines (18 loc) • 788 B
TypeScript
export type JSXElement = string | number | boolean | null | undefined | Node | Element | any[];
export interface JSXProps {
children?: JSXElement | JSXElement[];
[key: string]: any;
}
export type Component<P = any> = (props: P) => Element | HTMLElement | null;
/**
* Factory function for JSX elements
*/
export declare function jsx(tag: string | Component, props?: JSXProps): Element | null;
export declare const jsxs: typeof jsx;
export declare const Fragment: (props: {
children?: JSXElement | JSXElement[];
}) => DocumentFragment;
/**
* Create an element using a more familiar syntax similar to React.createElement
*/
export declare function createElement(tag: string | Component, props?: JSXProps | null, ...children: any[]): Element | HTMLElement | DocumentFragment;