vue/flow/options.js

76 lines
1.7 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;
2016-12-05 00:34:53 +08:00
_renderChildren: ?Array<VNode>;
2016-07-26 09:28:46 +08:00
_componentTag: ?string;
_parentElm: ?Node;
_refElm: ?Node;
2016-07-26 09:28:46 +08:00
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
beforeCreate?: Function;
2016-07-26 09:28:46 +08:00
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-12-05 00:34:53 +08:00
_renderChildren?: ?Array<VNode>;
_componentTag: ?string;
_scopeId: ?string;
_base: Class<Component>;
_parentElm: ?Node;
_refElm: ?Node;
2016-05-14 16:10:48 +08:00
}
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
}