import { AddClassesArgs } from '../dom/create-dom-element'; import { MaybeArray } from '../utils/array'; import { EmptyContext, Context } from './v-component'; export type WithHtml = { html: HTMLElement; }; export type HTML = HTMLElement | Comment; export interface VComponent { init(parent: WithHtml): void; renderOnce(): MaybeArray; __type: 'V_COMPONENT'; html: MaybeArray; addClass(args?: AddClassesArgs): VComponent; destroy?(): void; parent: WithHtml; provide?(ctx: Ctx): void; } export type TinafElement = HTML | VComponent;