DisposeHook · Core API
type DisposeHook<T> = (instance) => void | Promise<void>;Cleanup hook called for a cached instance during container disposal.
Transient providers cannot use disposal hooks because their instances are not cached or tracked by the container.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
|
|
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”void | Promise<void>