add jsdoc comments
This commit is contained in:
1 parent
6de354ad47
commit
8c1205bc13
24 files changed
+1228
-425
No files matched your search
@@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @template {keyof HTMLElementTagNameMap} K
|
||||
* @param {K} tagName
|
||||
* @param {string | ((e: HTMLElementTagNameMap[K]) => void) | null} [init]
|
||||
* @param {...(string | Node)} children
|
||||
* @returns {HTMLElementTagNameMap[K]}
|
||||
*/
|
||||
export function createElement(tagName, init, ...children) {
|
||||
const element = document.createElement(tagName);
|
||||
if (typeof init === 'function') {
|
||||
|
||||
Reference in new issue
Block a user