Skip to content

Instantly share code, notes, and snippets.

@asoglovo
Last active February 7, 2020 10:47
Show Gist options
  • Save asoglovo/5249aa9a693caccbade1050f7b68dd38 to your computer and use it in GitHub Desktop.
Save asoglovo/5249aa9a693caccbade1050f7b68dd38 to your computer and use it in GitHub Desktop.
Vue 3 VNode type (runtime-core / vnode.ts)
export interface VNode<HostNode = any, HostElement = any> {
_isVNode: true
type: VNodeTypes
props: VNodeProps | null
/* elided */
children: VNodeNormalizedChildren<HostNode, HostElement>
component: ComponentInternalInstance | null
/* elided */
// DOM
el: HostNode | null
anchor: HostNode | null // fragment anchor
target: HostElement | null // portal target
// optimization only
shapeFlag: number
patchFlag: number
dynamicProps: string[] | null
dynamicChildren: VNode[] | null
// application root node only
appContext: AppContext | null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment