Skip to content

Commit ced2dfc

Browse files
committed
expose vnode.child for backwards compat, update .flowconfig & ts types
1 parent 30258a9 commit ced2dfc

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Diff for: .flowconfig

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
flow
1212

1313
[options]
14+
unsafe.enable_getters_and_setters=true
1415
module.name_mapper='^compiler/\(.*\)$' -> '<PROJECT_ROOT>/src/compiler/\1'
1516
module.name_mapper='^core/\(.*\)$' -> '<PROJECT_ROOT>/src/core/\1'
1617
module.name_mapper='^shared/\(.*\)$' -> '<PROJECT_ROOT>/src/shared/\1'

Diff for: src/core/vdom/vnode.js

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ export default class VNode {
4848
this.isCloned = false
4949
this.isOnce = false
5050
}
51+
52+
// DEPRECATED: alias for componentInstance for backwards compat.
53+
get child (): Component | void {
54+
return this.componentInstance
55+
}
5156
}
5257

5358
export const createEmptyVNode = () => {

Diff for: types/vnode.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface VNode {
1717
context?: Vue;
1818
key?: string | number;
1919
componentOptions?: VNodeComponentOptions;
20-
child?: Vue;
20+
componentInstance?: Vue;
2121
parent?: VNode;
2222
raw?: boolean;
2323
isStatic?: boolean;

0 commit comments

Comments
 (0)