UNPKG

alien-dom

Version:

Next-generation JSX client renderer with observable data primitives, immediate DOM references, and more.

31 lines (26 loc) 1.39 kB
import { Falsy } from '@alloc/types'; import { J as JSX, D as DeferredCompositeNode, e as HostNodeTag, f as FunctionComponent } from './animate-b617067e.js'; declare function Fragment(props: { children: JSX.ChildrenProp; }): JSX.Element; declare function createFragment(children: JSX.ChildrenProp): DocumentFragment | DeferredCompositeNode; /** * When the JSX is compiled, this symbol gets passed as the `key` prop of any * unkeyed JSX element that's created outside of a component. It forces the * runtime to return a DOM element from the compiled `jsx` call. * * This was added to allow user-defined, "helper" functions that create JSX * elements to be called by a component while rendering. Without this feature, * the runtime would return a virtual node instead of a DOM element, which would * prevent natural DOM manipulation. */ declare const FORCE_DOM: unique symbol; declare const SVGNamespace = "http://www.w3.org/2000/svg"; type Props = { ref?: JSX.ElementRef; children?: JSX.ChildrenProp; }; declare function jsx(tag: HostNodeTag | FunctionComponent<any> | Falsy, props: Props, key?: JSX.ElementKey | typeof FORCE_DOM): any; /** This is used by JSX SVG elements. */ declare function createElement(tag: any, props: any, ...children: any[]): any; export { Fragment as F, SVGNamespace as S, createFragment as a, FORCE_DOM as b, createElement as c, jsx as j };