import { VNode } from './vnode' export const SuspenseSymbol = __DEV__ ? Symbol('Suspense key') : Symbol() export interface SuspenseBoundary< HostNode, HostElement, HostVNode = VNode > { vnode: HostVNode parent: SuspenseBoundary | null subTree: HostVNode | null oldSubTree: HostVNode | null fallbackTree: HostVNode | null oldFallbackTree: HostVNode | null deps: number isResolved: boolean bufferedJobs: Function[] retry(): void resolve(): void } export function createSuspenseBoundary( vnode: VNode, parent: SuspenseBoundary | null, retry: () => void, resolve: () => void ): SuspenseBoundary { return { vnode, parent, deps: 0, subTree: null, oldSubTree: null, fallbackTree: null, oldFallbackTree: null, isResolved: false, bufferedJobs: [], retry, resolve } }