Skip to content

Commit 7f91557

Browse files
committed
chore: update Suspense dependency registration to use GenericComponentInstance
1 parent 4ccb47f commit 7f91557

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/runtime-core/src/components/Suspense.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import {
1111
openBlock,
1212
} from '../vnode'
1313
import { ShapeFlags, isArray, isFunction, toNumber } from '@vue/shared'
14-
import type { ComponentInternalInstance } from '../component'
14+
import type {
15+
ComponentInternalInstance,
16+
GenericComponentInstance,
17+
} from '../component'
1518
import type { Slots } from '../componentSlots'
1619
import {
1720
type ElementNamespace,
@@ -430,7 +433,7 @@ export interface SuspenseBoundary {
430433
): void
431434
next(): RendererNode | null
432435
registerDep(
433-
instance: ComponentInternalInstance,
436+
instance: GenericComponentInstance,
434437
onResolve: (setupResult: unknown) => void,
435438
): void
436439
unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void

packages/runtime-vapor/src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ export function mountComponent(
802802
!instance.asyncResolved
803803
) {
804804
const component = instance.type
805-
instance.suspense.registerDep(instance as any, setupResult => {
805+
instance.suspense.registerDep(instance, setupResult => {
806806
handleSetupResult(
807807
setupResult,
808808
component,

0 commit comments

Comments
 (0)