import type { Computed, NativeSignal } from "native-signal/weak"; export type BaseContents = number | string | boolean | {to_html():Contents} | Promise | Element | Comment | DocumentFragment; export type Contents = BaseContents | BaseContents[] | Computed | NativeSignal; export abstract class Component { abstract root : NODE; to_html():NODE { return this.root; }; destroy() { this.root.remove(); } }