Skip to main content

Function: resolveCleanupHandler()

resolveCleanupHandler(cleanupCandidate: unknown, handlers: CleanupResolutionHandlers): () => void

Defined in: src/services/utils/cleanupHandlers.ts:72

Normalizes a cleanup candidate into a callable cleanup function.

Parametersโ€‹

cleanupCandidateโ€‹

unknown

Value produced by the preload bridge when registering a subscription.

handlersโ€‹

CleanupResolutionHandlers

Hooks used to react to invalid cleanup values or cleanup failures.

Returnsโ€‹

A cleanup function that is safe for callers to invoke regardless of the original cleanup candidate shape.

(): void

Returnsโ€‹

void