Function: registerShutdownHandler()
Prefactor TypeScript SDK / @prefactor/core / registerShutdownHandler
Function: registerShutdownHandler()
Section titled “Function: registerShutdownHandler()”registerShutdownHandler(
key,handler): () =>void
Defined in: packages/core/src/lifecycle.ts:23
Registers a shutdown hook for package-level cleanup.
Parameters
Section titled “Parameters”string
Unique identifier for the handler.
handler
Section titled “handler”() => void | Promise<void>
Cleanup callback executed during shutdown().
Returns
Section titled “Returns”Function that unregisters the handler.
():
void
Returns
Section titled “Returns”void