]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
refactor(types): add VNode to VNodeTypes
authorEvan You <yyx990803@gmail.com>
Tue, 7 Jul 2020 01:12:15 +0000 (21:12 -0400)
committerEvan You <yyx990803@gmail.com>
Tue, 7 Jul 2020 01:12:15 +0000 (21:12 -0400)
packages/runtime-core/src/vnode.ts

index 943d43ab37edd9c55c50a8709fb6fd726803d7d2..176f29ace3ec22411394246e7e2977a84824e5c4 100644 (file)
@@ -46,6 +46,7 @@ export const Static = Symbol(__DEV__ ? 'Static' : undefined)
 
 export type VNodeTypes =
   | string
+  | VNode
   | Component
   | typeof Text
   | typeof Static
@@ -290,7 +291,7 @@ export const createVNode = (__DEV__
   : _createVNode) as typeof _createVNode
 
 function _createVNode(
-  type: VNode | VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT,
+  type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT,
   props: (Data & VNodeProps) | null = null,
   children: unknown = null,
   patchFlag: number = 0,