Current section
Files
Jump to
Current section
Files
dist/test-utils/html.d.ts
/**
* A proxy for creating HTML elements with a fluent API.
*
* @example
* // Create a div with class 'container' and id 'main'
* const div = html.div({ class: 'container', id: 'main' },
* html.span('Hello World')
* );
*/
export declare const html: HtmlElementMap;
/**
* Attributes object for HTML elements
*/
type HtmlAttributes = Record<string, string | number | boolean | null | undefined>;
/**
* Content that can be passed as children to HTML elements
*/
type HtmlContent = string | Node | null | undefined | false;
/**
* Type mapping for HTML elements
*/
type HtmlElementMap = {
[K in keyof HTMLElementTagNameMap]: (attributes?: HtmlAttributes | HtmlContent, ...children: HtmlContent[]) => HTMLElementTagNameMap[K];
} & {
[K in keyof SVGElementTagNameMap]: (attributes?: HtmlAttributes | HtmlContent, ...children: HtmlContent[]) => SVGElementTagNameMap[K];
};
export {};
//# sourceMappingURL=html.d.ts.map