tsx-dom
Version:
A simple way to use tsx syntax to create native dom elements using document.createElement.
8 lines (7 loc) • 418 B
TypeScript
import { ComponentAttributes, ComponentChild } from "./types";
export declare function applyChildren(element: JSX.Element, children: ComponentChild[]): void;
export declare function createDomElement(tag: string, attrs: ComponentAttributes | null): HTMLElement | SVGElement;
export declare function applyTsxTag<T extends null | ComponentAttributes>(tag: string, attrs: T): {
finalTag: string;
finalAttrs: T;
};