Skip to content

DI Bag API / index / LifecycleObserver

Interface: LifecycleObserver ​

Defined in: observers.ts:66

Both callbacks required by DiBagApi.withConfiguration.

See ​

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

Properties ​

onLifecycleEvent ​

ts
readonly onLifecycleEvent: ObserverCallback;

Defined in: observers.ts:68

Receives events in transition and observer attachment order on a microtask queue.


onObserverFailure ​

ts
readonly onObserverFailure: ObserverErrorCallback;

Defined in: observers.ts:70

Receives synchronous throws and rejected results from onLifecycleEvent.

Ordinary services. Checked composition. Explicit ownership.