import 'reflect-metadata'; import { Constructor, NonFuncPropNames, Optional } from './types'; import { RenderableStateDescriber } from './types'; import { VDomStruct } from './vdom/vdom'; declare type StateNames = Exclude, 'refs' | '_propsType' | '_events' | '_contents' | '_subviewMap'>; declare type States = Pick>; export declare type VEventData, N extends keyof V['_subviewMap'], E extends keyof EV, EV = InstanceType['_events'], F = EV[E]> = F extends (data: infer A) => void ? A : void; export declare type VSubviewType, P> = Constructor; declare type BaseView = View; interface SubviewPropsInfo { [name: string]: { dependencies: string[]; getter: () => any; }; } export declare function vSubviewMap(...subviewPropDescribers: RenderableStateDescriber[]): (view: View, _: string) => void; export declare function vState(describer?: RenderableStateDescriber): (view: View, stateName: string) => void; export declare function vComputed(...dependencies: Array>): (view: View, stateName: string, descriptor: TypedPropertyDescriptor) => void; export declare function vWatch(...dependencies: Array>): (view: View, key: string, descriptor: TypedPropertyDescriptor) => void; export declare abstract class View> { private readonly _viewClassName; static readonly propsDescriber: RenderableStateDescriber; private static getMetadata; private static defineState; private static defineComputedState; private static defineStateWatcher; abstract _propsType: {}; abstract readonly _events: { [k: string]: (data?: any) => void; }; abstract readonly _subviewMap: { [k: string]: Constructor>; }; protected abstract readonly _contents: VDomStruct; protected readonly refs: { [ref: string]: HTMLElement; }; private _metadata; private _vNodeRegister; private _vRoot?; private _viewModel; private _subviewPropsInfo; private _initialProps; private _slotPlugins; private _insertTarget?; constructor(props?: V['_propsType']); appendTo(container: HTMLElement): void; insertAfter(prevSiblingNode: Node): void; /** nothing but a shorthand, do the exact same thing as direct assignment */ setState(state: Optional>): void; protected onMount(props: this['_propsType']): void; protected onPropsChange(props: this['_propsType']): void; protected onBeforeDestroy(): void; /** abstract v.ts view class will generate and implement this */ protected getPropsDescriber(): RenderableStateDescriber | null; protected abstract _linkSubviewProps(): SubviewPropsInfo; private mergeStateMetaDescribers; private initView; private destroy; private createVRoot; private defineProperties; private setPropsFromParent; private setSlotPluginsFromParent; private registerSubviewNode; private registerSlotNode; private initialRender; private update; } export {};