interface AnyHTMLElementTagNameMap extends HTMLElementTagNameMap {
[key: string]: HTMLElement;
}
type CreateElementChildren = string | Node | Array;
type CreateElementAttributes = {
data?: Record | string;
class?: string;
id?: string;
[key: string]: string | Record | undefined;
};
/**
* Functional DOM Element creation.
*
* If only 2 arguments are given and the second is an array, a string or a Node,
* then it will be used as children.
*
* @example
* ```js
* createElement(); //
* createElement('a'); //
* createElement('a', { href: '#' }); //
* createElement('a', { href: '#'}, [createElement('span')]); //
* createElement('a', 'link'); // link
* ```
*
* @param tag The tag name of the element to create.
* @param attributes The attributes to set on the created element.
* @param children The children to append to the created element.
* @link https://js-toolkit.studiometa.dev/utils/createElement.html
*/
export declare function createElement(tag?: T, children?: CreateElementChildren): AnyHTMLElementTagNameMap[T];
export declare function createElement(tag?: T, attributes?: CreateElementAttributes, children?: CreateElementChildren): AnyHTMLElementTagNameMap[T];
export {};