From 5404a95c15e176d25728bf1a319ddb9828b23625 Mon Sep 17 00:00:00 2001 From: Josh Kingsley Date: Sat, 25 Oct 2025 20:46:35 +0300 Subject: refactor(web): re-organize files --- web/html.ts | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 web/html.ts (limited to 'web/html.ts') diff --git a/web/html.ts b/web/html.ts deleted file mode 100644 index 5bfff21..0000000 --- a/web/html.ts +++ /dev/null @@ -1,26 +0,0 @@ -export type CreateElement = { - (...children: (Node | string)[]): T; - (attrs: Partial, ...children: (Node | string)[]): T; -}; - -type ElementCreator = { - [K in keyof HTMLElementTagNameMap]: CreateElement; -}; - -const h = new Proxy({} as ElementCreator, { - get: - (_, tag: string) => - (...args: any[]) => { - const el = document.createElement(tag); - - if (typeof args[0] === "object") { - Object.assign(el, args.shift()); - } - - el.append(...args.flat()); - - return el; - }, -}); - -export default h; -- cgit v1.2.3