|
|
|
declare type VNodeChildren = Array<any> | string
|
|
|
|
|
|
|
|
declare type VNodeComponentOptions = {
|
|
|
|
Ctor: Class<Component>;
|
|
|
|
propsData: ?Object;
|
|
|
|
listeners: ?Object;
|
|
|
|
children: ?VNodeChildren;
|
|
|
|
tag?: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare type MountedComponentVNode = {
|
|
|
|
componentOptions: VNodeComponentOptions;
|
|
|
|
child: Component;
|
|
|
|
parent: VNode;
|
|
|
|
data: VNodeData;
|
|
|
|
}
|
|
|
|
|
|
|
|
// interface for vnodes in update modules
|
|
|
|
declare type VNodeWithData = {
|
|
|
|
tag: string;
|
|
|
|
data: VNodeData;
|
|
|
|
children: Array<VNode> | void;
|
|
|
|
text: void;
|
|
|
|
elm: HTMLElement;
|
|
|
|
ns: string | void;
|
|
|
|
context: Component;
|
|
|
|
key: string | number | void;
|
|
|
|
parent?: VNodeWithData;
|
|
|
|
child?: Component;
|
|
|
|
isRootInsert: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare interface VNodeData {
|
|
|
|
key?: string | number;
|
|
|
|
slot?: string;
|
|
|
|
ref?: string;
|
|
|
|
tag?: string;
|
|
|
|
staticClass?: string;
|
|
|
|
class?: any;
|
|
|
|
style?: Array<Object> | Object;
|
|
|
|
show?: true;
|
|
|
|
props?: { [key: string]: any };
|
|
|
|
attrs?: { [key: string]: string };
|
|
|
|
domProps?: { [key: string]: any };
|
|
|
|
hook?: { [key: string]: Function };
|
|
|
|
on?: ?{ [key: string]: Function | Array<Function> };
|
|
|
|
nativeOn?: { [key: string]: Function | Array<Function> };
|
|
|
|
transition?: Object;
|
|
|
|
inlineTemplate?: {
|
|
|
|
render: Function;
|
|
|
|
staticRenderFns: Array<Function>;
|
|
|
|
};
|
|
|
|
directives?: Array<VNodeDirective>;
|
|
|
|
keepAlive?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare type VNodeDirective = {
|
|
|
|
name: string;
|
|
|
|
value?: any;
|
|
|
|
oldValue?: any;
|
|
|
|
arg?: string;
|
|
|
|
modifiers?: { [key: string]: boolean };
|
|
|
|
}
|