vue/flow/options.js

69 lines
1.5 KiB
JavaScript
Raw Normal View History

declare type InternalComponentOptions = {
2016-07-26 09:28:46 +08:00
_isComponent: true;
parent: Component;
propsData: ?Object;
_parentVnode: VNode;
_parentListeners: ?Object;
_renderChildren: ?VNodeChildren;
_componentTag: ?string;
render?: Function;
staticRenderFns?: Array<Function>
}
2016-05-14 15:08:21 +08:00
declare type ComponentOptions = {
2016-05-14 16:10:48 +08:00
// data
2016-07-26 09:28:46 +08:00
data: Object | Function | void;
props?: { [key: string]: PropOptions };
propsData?: ?Object;
2016-05-14 16:10:48 +08:00
computed?: {
[key: string]: Function | {
2016-07-26 09:28:46 +08:00
get?: Function;
set?: Function;
2016-05-14 16:10:48 +08:00
cache?: boolean
}
2016-07-26 09:28:46 +08:00
};
2016-05-14 16:10:48 +08:00
methods?: {
[key: string]: Function
2016-07-26 09:28:46 +08:00
};
2016-05-14 16:10:48 +08:00
watch?: {
[key: string]: Function | string
2016-07-26 09:28:46 +08:00
};
2016-05-14 16:10:48 +08:00
// DOM
2016-07-26 09:28:46 +08:00
el?: string | Element;
template?: string;
render: () => VNode;
staticRenderFns?: Array<() => VNode>;
2016-05-14 16:10:48 +08:00
// lifecycle
2016-07-26 09:28:46 +08:00
init?: Function;
created?: Function;
beforeMount?: Function;
mounted?: Function;
beforeUpdate?: Function;
updated?: Function;
2016-05-14 16:10:48 +08:00
// assets
2016-07-26 09:28:46 +08:00
directives?: { [key: string]: Object };
components?: { [key: string]: Class<Component> };
transitions?: { [key: string]: Object };
filters?: { [key: string]: Function };
2016-05-14 16:10:48 +08:00
// misc
2016-07-26 09:28:46 +08:00
parent?: Component;
mixins?: Array<Object>;
name?: string;
extends?: Class<Component> | Object;
delimiters?: [string, string];
2016-05-14 15:08:21 +08:00
2016-05-14 16:10:48 +08:00
// private
2016-07-26 09:28:46 +08:00
_isComponent?: true;
_propKeys?: Array<string>;
_parentVnode?: VNode;
_parentListeners?: ?Object;
2016-05-14 16:10:48 +08:00
_renderChildren?: ?VNodeChildren
}
declare type PropOptions = {
2016-07-26 09:28:46 +08:00
type: Function | Array<Function> | null;
default: any;
required: ?boolean;
validator: ?Function;
2016-05-14 15:08:21 +08:00
}