mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-01 10:18:54 -04:00
Fixed element typings
This commit is contained in:
@@ -83,7 +83,7 @@ function appendChild(el: Element, child: Child): void {
|
||||
export function h(
|
||||
tag: string, attributes: Attributes | null,
|
||||
...children: Array<Element | Text | string | number>
|
||||
) {
|
||||
): Element {
|
||||
const el = document.createElement(tag)
|
||||
|
||||
/* Set attributes, if any */
|
||||
@@ -102,6 +102,17 @@ export function h(
|
||||
return el
|
||||
}
|
||||
|
||||
/**
|
||||
* JSX factory wrapper
|
||||
*
|
||||
* @param el - JSX element
|
||||
*
|
||||
* @return Element
|
||||
*/
|
||||
export function toElement(el: JSXInternal.Element): Element {
|
||||
return el as any // Hack: if you have a better idea, PR!
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Namespace
|
||||
* ------------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user