Function: subscribeWithValidatedCleanup()
subscribeWithValidatedCleanup(
register: () =>unknown,handlers:CleanupResolutionHandlers):Promise<() =>void>
Defined in: src/services/utils/cleanupHandlers.ts:105
Registers a subscription and validates the resulting cleanup handler.
Parametersโ
registerโ
() => unknown
Function invoking the preload subscription and returning the cleanup candidate (or a promise thereof).
handlersโ
Hooks for invalid cleanup values and cleanup failures.
Returnsโ
Promise<() => void>
Promise resolving to a normalized cleanup function.