import { Literal, Close, WithElse, ComponentSlotAux, ComponentTag } from './basic'; import { B } from './block'; import { P } from './phrase'; import { HTMLBrand } from './interface'; import { Emitter } from '../core/interface'; export interface $ScopedSlots { $scopedSlots: { [K in Slots]: (t: T) => HTMLBrand; }; } export interface ComponentEventAux extends ComponentTag<{ $emit: Emitter; }> { } export interface ComponentPropAux extends ComponentTag<{ props: C; }> { } export interface ComponentScopedSlot extends ComponentTag<$ScopedSlots> { } export declare type Handlers = { [K in keyof T]: (t: T[K]) => void; }; export interface VDom { class(nameHash: { [k: string]: boolean; }): Common; class(...names: string[]): Common; on(this: ComponentEventAux, handlerHash: Handlers): Common; props(this: ComponentPropAux, nameHash: C1): Common; nativeOn(handlerHash: { [k: string]: Function; }): Common; domProps(nameHash: { [k: string]: any; }): Common; style(nameHash: { [k: string]: any; }): Common; attrs(nameHash: { [k: string]: any; }): Common; asSlot(this: ComponentSlotAux, name: keyof S): Common; ref(name: string): Common; key(k: any): Common; directives(d: any): Common; scopedSlot(this: ComponentScopedSlot, fn: (k: S) => HTMLBrand): Common; scopedSlot(this: ComponentScopedSlot, key: K, fn: (k: S) => HTMLBrand): Common; } export declare type Common = T & VDom; export declare type CloseC = Close & ComponentTag; export interface BIf { if(this: { parent: Pt; }, condition: boolean): Common, End, Comp>, Comps>>; } export declare type _BIf = BIf & Common, Comps>>; export declare type ComponentB = Literal<_BIf>; export interface PIf { if(this: { parent: Pt; }, condition: boolean): Common, End, Comp>, Comps>>; } export declare type _PIf = PIf & Common, Comps>>; export declare type ComponentP = Literal<_PIf>;