type Tags = keyof HTMLElementTagNameMap; type Elem = HTMLElementTagNameMap[T]; type DeepPartial = T extends Function | Array ? T : { [K in keyof T]?: T[K] extends object ? DeepPartial : T[K]; }; type PickByType = { [P in keyof T as T[P] extends U ? P : never]: T[P]; }; type ElemAttributes = DeepPartial>; type ElemText = string | number; type ElemChildren = Array; type TagObj = { tag: T; id?: string; }; type TagLike = T | TagObj; type Stringable = { toString: () => string; }; type StyleProps = Partial> & { [property: string]: string; }; declare function elem(tag: TagLike): Elem; declare function elem(tag: TagLike, attributes: ElemAttributes): Elem; declare function elem(tag: TagLike, attributes: ElemAttributes, children: ElemChildren): Elem; declare function elem(tag: TagLike, children: ElemChildren): Elem; declare function elem(tag: TagLike, text: ElemText): Elem; declare function elem(tag: TagLike, attributes: ElemAttributes, text: ElemText): Elem; declare function style(selector: string | Stringable, properties: StyleProps): CSSStyleRule | null; declare function media(condition: string, styleRules: Record): CSSMediaRule | null; declare function queryElem(selector: string, tag?: T): "main" extends T ? HTMLElement : Elem; declare function getElem(id: string, tag?: T): "main" extends T ? HTMLElement : Elem; declare function getChild(id: string, tag?: T): "main" extends T ? HTMLElement : Elem; declare function getParent(id: string, tag?: T): "main" extends T ? HTMLElement : Elem; declare const thisModule: Readonly<{ elem: typeof elem; style: typeof style; media: typeof media; getElem: typeof getElem; queryElem: typeof queryElem; getChild: typeof getChild; getParent: typeof getParent; refElem: (tag: T) => { (): Elem; id: string; tag: T; selector: string; toString(): string; }; version: string; }>; declare global { var iuai: typeof thisModule; } export {};