sync working code, and import type-doc

This commit is contained in:
2023-07-17 17:24:49 +08:00
parent 7ab7a7094a
commit 3e9ee59178
43 changed files with 1024 additions and 1553 deletions

8
lib/functions.d.ts vendored
View File

@ -1 +1,7 @@
export function createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, init?: string | ((element: HTMLElementTagNameMap[K]) => void), ...children?: (Node | string)[]): HTMLElementTagNameMap[K];
/**
* 创建一个 html 元素
* @param tagName 标签名
* @param init 样式类名,或者为有一个 html 元素作为参数的函数
* @param children 子元素
*/
export function createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, init?: string | ((element: HTMLElementTagNameMap[K]) => void), ...children: (Node | string)[]): HTMLElementTagNameMap[K];