test: test nested suspense & nested async deps
This commit is contained in:
@@ -124,6 +124,12 @@ export function createBlock(
|
||||
return vnode
|
||||
}
|
||||
|
||||
const knownVNodes = new WeakSet<VNode>()
|
||||
|
||||
export function isVNode(value: any): boolean {
|
||||
return knownVNodes.has(value)
|
||||
}
|
||||
|
||||
export function createVNode(
|
||||
type: VNodeTypes,
|
||||
props: { [key: string]: any } | null | 0 = null,
|
||||
@@ -198,6 +204,10 @@ export function createVNode(
|
||||
trackDynamicNode(vnode)
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
knownVNodes.add(vnode)
|
||||
}
|
||||
|
||||
return vnode
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user