Skip to content

Function: registerShutdownHandler()

Prefactor TypeScript SDK


Prefactor TypeScript SDK / @prefactor/core / registerShutdownHandler

registerShutdownHandler(key, handler): () => void

Defined in: packages/core/src/lifecycle.ts:23

Registers a shutdown hook for package-level cleanup.

string

Unique identifier for the handler.

() => void | Promise<void>

Cleanup callback executed during shutdown().

Function that unregisters the handler.

(): void

void