mirror of
https://github.com/vuejs/vue.git
synced 2024-11-22 04:39:46 +00:00
expose vnode.child for backwards compat, update .flowconfig & ts types
This commit is contained in:
parent
30258a9a60
commit
ced2dfc8f7
@ -11,6 +11,7 @@
|
||||
flow
|
||||
|
||||
[options]
|
||||
unsafe.enable_getters_and_setters=true
|
||||
module.name_mapper='^compiler/\(.*\)$' -> '<PROJECT_ROOT>/src/compiler/\1'
|
||||
module.name_mapper='^core/\(.*\)$' -> '<PROJECT_ROOT>/src/core/\1'
|
||||
module.name_mapper='^shared/\(.*\)$' -> '<PROJECT_ROOT>/src/shared/\1'
|
||||
|
@ -48,6 +48,11 @@ export default class VNode {
|
||||
this.isCloned = false
|
||||
this.isOnce = false
|
||||
}
|
||||
|
||||
// DEPRECATED: alias for componentInstance for backwards compat.
|
||||
get child (): Component | void {
|
||||
return this.componentInstance
|
||||
}
|
||||
}
|
||||
|
||||
export const createEmptyVNode = () => {
|
||||
|
2
types/vnode.d.ts
vendored
2
types/vnode.d.ts
vendored
@ -17,7 +17,7 @@ export interface VNode {
|
||||
context?: Vue;
|
||||
key?: string | number;
|
||||
componentOptions?: VNodeComponentOptions;
|
||||
child?: Vue;
|
||||
componentInstance?: Vue;
|
||||
parent?: VNode;
|
||||
raw?: boolean;
|
||||
isStatic?: boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user