UNPKG

@soil/arch

Version:

Architectural constructs for web applications.

12 lines (11 loc) 650 B
import { Props } from '../../shared/types/Props'; /** * Define a custom UI component, i.e. a piece of code whose (only) purpose is to * render HTML and/or SVG elements on the screen and manage the user interaction * with these. * * Components created with this function will behave very similarly to native * HTML and SVG elements – custom elements can be considered special cases of * native ones (as in Web Components). */ export declare function element<E extends Element, A extends Props<E> & Record<string, any>, C extends void | (string | Element)[]>(definition: (children: C) => [E, A]): (props: Props<E & A>, children: C) => E & A;