zerolith/jsx-runtime
Import from zerolith/jsx-runtime. Generated from the source; every signature below is what the published types declare.
Functions
jsx
function jsx(): neverReached only when JSX was not lowered; throws a diagnostic.
Source: packages/zerolith/src/jsx-runtime.ts:43
jsxs
function jsxs(): neverThe same as jsx.
Source: packages/zerolith/src/jsx-runtime.ts:49
jsxDEV
function jsxDEV(): neverThe same as jsx.
Source: packages/zerolith/src/jsx-runtime.ts:52
Types
ElementAttributes
type ElementAttributes = { readonly children?: unknown; readonly ref?: unknown; readonly [attribute: string]: unknown; readonly [property: `prop:${string}`]: unknown; readonly [event: `on:${string}`]: unknown; readonly [flag: `bool:${string}`]: unknown }Attribute names an element accepts: plain attributes, and the prop:, on:, bool:, and attr: namespaces that select the other binding forms.
Source: packages/zerolith/src/jsx-runtime.ts:11
Constants
Fragment
const Fragment: unique symbolFragments lower to a template with no root element; the marker exists only for the types.
Source: packages/zerolith/src/jsx-runtime.ts:40
Namespaces
JSX
namespace JSXThe JSX namespace TypeScript reads.
type Element = View: The type TypeScript gives every JSX expression and checks a function component's return type against: aView, which the loweredhtmlcall returns.interface ElementChildrenAttribute { children: unknown }: Names the prop that carries children; TypeScript reads only the property's name,children, and checks the content between an element's tags against that prop.interface IntrinsicAttributes { ref?: unknown }: Props TypeScript accepts on every component element on top of the component's own:ref, which the lowering passes to the component as an ordinary prop.type IntrinsicElements = { readonly [tag in keyof HTMLElementTagNameMap]: ElementAttributes } & { readonly [tag: string]: ElementAttributes }: Maps each intrinsic tag, a name such asdivormy-card, to the attributes TypeScript checks on it:ElementAttributesfor every tag.
Source: packages/zerolith/src/jsx-runtime.ts:21