namespace Leaf { export interface DynamicValueConfig { type: "raw" | "value" //{{content:value}} content: string value?: string //{{!content:value}} then true reverse?: boolean } export interface DynamicStringConfig { templates: DynamicValueConfig[] } export interface DynamicPropertyConfig extends DynamicStringConfig { name: string } export type DOMEventInfo = { name: string bubble: boolean target?: string[] } export type ElementConfigProperties = { [index: string]: DynamicPropertyConfig | string } export type DynamicProperties = { [index: string]: DynamicPropertyConfig } export type WidgetEventHandler = { (e: Event): void } export type WidgetTemplate = string | HTMLElement | { (): string | HTMLElement } export interface WidgetEnhancedEvent extends Event { capture?: { (): void } bubblingTarget: HTMLElement } export type Slot = { name: string, el: Element | Text } export type Callback = (error?: E, option?: T) => void }