UNPKG

tsx-dom-ssr

Version:

A simple way to use tsx syntax to do async server-side-rendering.

26 lines (25 loc) 953 B
import type { ComponentChildren, CustomElementsHTML, IntrinsicElementsHTML, IntrinsicElementsSVG } from "./types"; export * from "./createContext"; export * from "./createElement"; export * from "./domUtils"; export * from "./jsx-runtime"; export * from "./ErrorBoundary"; export * from "./types"; export interface TsxConfig { [s: string]: boolean; } type IfTsxConfig<T extends string, TIF, TELSE> = TsxConfig[T] extends false ? TELSE : TIF; type IntrinsicElementsCombined = IfTsxConfig<"html", IntrinsicElementsHTML, unknown> & IfTsxConfig<"svg", IntrinsicElementsSVG, unknown>; declare global { namespace JSX { type Element = ComponentChildren; interface ElementAttributesProperty { props: unknown; } interface ElementChildrenAttribute { children: ComponentChildren; } interface IntrinsicElements extends IntrinsicElementsCombined, CustomElementsHTML { } } }