Evan You
9 years ago
13 changed files with 208 additions and 82 deletions
@ -1 +1,2 @@ |
|||
flow |
|||
dist |
|||
|
@ -0,0 +1,22 @@ |
|||
declare interface GlobalAPI { |
|||
cid: number; |
|||
options: Object; |
|||
config: Config; |
|||
util: Object; |
|||
|
|||
extend: (options: Object) => Function; |
|||
set: (obj: Object, key: string, value: any) => void; |
|||
delete: (obj: Object, key: string) => void; |
|||
nextTick: (fn: Function, context?: Object) => void; |
|||
use: (plugin: Function | Object) => void; |
|||
mixin: (mixin: Object) => void; |
|||
compile: (template: string) => { render: Function, staticRenderFns: Array<Function> }; |
|||
|
|||
directive: (id: string, def?: Function | Object) => Function | Object | void; |
|||
component: (id: string, def?: Class<Component> | Object) => Class<Component>; |
|||
transition: (id: string, def?: Object) => Object | void; |
|||
filter: (id: string, def?: Function) => Function | void; |
|||
|
|||
// allow dynamic method registration
|
|||
[key: string]: any |
|||
} |
@ -0,0 +1,3 @@ |
|||
declare type ComponentOptions = { |
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
declare type VNodeChildren = Array<any> | () => Array<any> | string |
|||
|
|||
declare type VNodeComponentOptions = { |
|||
Ctor: Class<Component>, |
|||
propsData: ?Object, |
|||
listeners: ?Object, |
|||
parent: Component, |
|||
children: ?VNodeChildren |
|||
} |
|||
|
|||
declare interface MountedComponentVNode { |
|||
componentOptions: VNodeComponentOptions; |
|||
child: Component; |
|||
} |
|||
|
|||
declare interface VNodeData { |
|||
pre?: true; |
|||
key?: string | number; |
|||
slot?: string; |
|||
staticClass?: string; |
|||
class?: any; |
|||
style?: Array<Object> | Object; |
|||
show?: true; |
|||
props?: { [key: string]: any }; |
|||
attrs?: { [key: string]: string }; |
|||
staticAttrs?: { [key: string]: string }; |
|||
hook?: { [key: string]: Function }; |
|||
on?: { [key: string]: Function | Array<Function> }; |
|||
transition?: { |
|||
definition: String | Object, |
|||
appear: boolean |
|||
}; |
|||
inlineTemplate?: { |
|||
render: Function, |
|||
staticRenderFns: Array<Function> |
|||
}; |
|||
directives?: Array<{ |
|||
name: string, |
|||
value?: any, |
|||
arg?: string, |
|||
modifiers?: { [key: string]: boolean } |
|||
}>; |
|||
} |
Loading…
Reference in new issue