refactor(types): add VNode to VNodeTypes

This commit is contained in:
Evan You 2020-07-06 21:12:15 -04:00
parent 9ee85a3783
commit d7184c99e6

View File

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