Skip to content

DI Bag API / index / ObserverCallback

Type Alias: ObserverCallback ​

ts
type ObserverCallback = (this: void, event: LifecycleEvent) => unknown;

Defined in: observers.ts:56

An asynchronous, non-gating callback for frozen lifecycle events.

Parameters ​

ParameterDescription
this-
event-

See ​

https://dany-fedorov.github.io/di-bag/guides/tutorial.html#observe-lifecycle-transitions

Ordinary services. Checked composition. Explicit ownership.