export type Element = string | [tag: string, props?: ElementProps]; export interface ElementProps { [key: string]: string | number | StyleProps; } export interface StyleProps { [key: string]: string | number; } export interface UIRoot { [element: string]: Element[] | { state?: string; states?: string[]; props?: { [key: string]: any; }; children?: Element[]; }; }