- Notifications
You must be signed in to change notification settings - Fork 33.7k
/
Copy pathvnode.d.ts
117 lines (107 loc) · 2.71 KB
/
vnode.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import{StyleValue}from'./jsx'
import{Vue}from'./vue'
import{DirectiveFunction,DirectiveOptions}from'./options'
import{Ref}from'./v3-generated'
import{ComponentPublicInstance}from'./v3-component-public-instance'
/**
* For extending allowed non-declared props on components in TSX
*/
exportinterfaceComponentCustomProps{}
/**
* Default allowed non-declared props on component in TSX
*/
exportinterfaceAllowedComponentProps{
class?: unknown
style?: unknown
}
exporttypeScopedSlot=(props: any)=>ScopedSlotReturnValue
typeScopedSlotReturnValue=
|VNode
|string
|boolean
|number
|null
|undefined
|ScopedSlotReturnArray
interfaceScopedSlotReturnArrayextendsArray<ScopedSlotReturnValue>{}
// Scoped slots are guaranteed to return Array of VNodes starting in 2.6
exporttypeNormalizedScopedSlot=(props: any)=>ScopedSlotChildren
exporttypeScopedSlotChildren=VNode[]|undefined
// Relaxed type compatible with $createElement
exporttypeVNodeChildren=
|VNodeChildrenArrayContents
|[ScopedSlot]
|string
|boolean
|number
|null
|undefined
exportinterfaceVNodeChildrenArrayContents
extendsArray<VNodeChildren|VNode>{}
exportinterfaceVNode{
tag?: string
data?: VNodeData
children?: VNode[]
text?: string
elm?: Node
ns?: string
context?: Vue
key?: string|number|symbol|boolean
componentOptions?: VNodeComponentOptions
componentInstance?: Vue
parent?: VNode
raw?: boolean
isStatic?: boolean
isRootInsert: boolean
isComment: boolean
}
exportinterfaceVNodeComponentOptions{
Ctor: typeofVue
propsData?: object
listeners?: object
children?: VNode[]
tag?: string
}
exporttypeVNodeRef=
|string
|Ref
|((
ref: Element|ComponentPublicInstance|null,
refs: Record<string,any>
)=>void)
exportinterfaceVNodeData{
key?: string|number
slot?: string
scopedSlots?: {[key: string]: ScopedSlot|undefined}
ref?: VNodeRef
refInFor?: boolean
tag?: string
staticClass?: string
class?: any
staticStyle?: {[key: string]: any}
style?: StyleValue
props?: {[key: string]: any}
attrs?: {[key: string]: any}
domProps?: {[key: string]: any}
hook?: {[key: string]: Function}
on?: {[key: string]: Function|Function[]}
nativeOn?: {[key: string]: Function|Function[]}
transition?: object
show?: boolean
inlineTemplate?: {
render: Function
staticRenderFns: Function[]
}
directives?: VNodeDirective[]
keepAlive?: boolean
}
exportinterfaceVNodeDirective{
name: string
value?: any
oldValue?: any
expression?: string
arg?: string
oldArg?: string
modifiers?: {[key: string]: boolean}
def?: DirectiveFunction|DirectiveOptions
}