nano-jsx
Version:
SSR first, lightweight 1kB JSX library.
16 lines • 965 B
TypeScript
import './types.js';
export declare const isSSR: () => boolean;
export interface FC<P = {}> {
(props: P): Element | void;
}
/** Creates a new Microtask using Promise() */
export declare const tick: (cb: Function) => any;
export declare const removeAllChildNodes: (parent: HTMLElement) => void;
export declare const strToHash: (s: string) => string;
export declare const appendChildren: (element: HTMLElement | SVGElement, children: HTMLElement[], escape?: boolean) => void;
/** Returns the populated parent if available else one child or an array of children */
export declare const render: (component: any, parent?: HTMLElement | null, removeChildNodes?: boolean) => any;
export declare const hydrate: (component: any, parent?: HTMLElement | null, removeChildNodes?: boolean) => any;
export declare const _render: (comp: any) => any;
export declare const h: (tagNameOrComponent: any, props?: any, ...children: any[]) => any;
//# sourceMappingURL=core.d.ts.map