// export interface XEvent extends Event { // target: EventTarget; // update: () => void; // query: () => E; // } export type Variable = string | number | Array | Record | ((event?: any) => any); // export type Variable = string | number | Array | Record | (() => any); export type Marker = string; export type Container = string | Element | ShadowRoot; export type Template = HTMLTemplateElement; export type Variables = Variable[]; export interface Initialize { (container?: string | Element | ShadowRoot): Element | ShadowRoot | DocumentFragment; } export type Results = any[]; export type ReferenceType = { data: any; get(): T | undefined; set(data: T): T | undefined; }; export type BinderType = 1 | 2 | 3 | 4; export interface Binder { type: BinderType; variable: Variable; name: any; value: any; node: Node | undefined; source?: any; target?: any; result?: any; // array start?: Text; // maybe weakref end?: Text; // maybe weakref length?: number; markers?: Node[]; results?: any[]; add: () => void; remove: () => void; // reference: Reference, // variables: Variables, // isOnce: boolean, // isReactive: boolean, // isInstance: boolean, isInitialized: boolean; } export type Bound = WeakMap; export type BindersCache = Set; // export type GlobalBinders = Set; // export type LocalBinders = Set; // export type QueueBinders = Set; export type TemplateCache = { template: Template; marker: Marker }; export type TemplatesCache = WeakMap; export type ContainersCache = WeakMap; export interface Global { BindersCache: BindersCache; TemplatesCache: TemplatesCache; ContainersCache: ContainersCache; MarkSymbol: symbol; ViewSymbol: symbol; TemplateSymbol: symbol; VariablesSymbol: symbol; } // export interface SelectInputEvent extends InputEvent { // target: HTMLSelectElement; // } // export interface InputInputEvent extends InputEvent { // target: HTMLInputElement; // }