The EventDispatcherProvider implementation to use
import {
useContainerProvider,
TsyringeProvider,
useEventDispatcherProvider,
MutableEventDispatcherProvider,
getContainerProvider
} from '@djodjonx/wiredi'
// 1. Setup DI container first
useContainerProvider(new TsyringeProvider({ container, Lifecycle }))
// 2. Setup event dispatcher (optional)
useEventDispatcherProvider(new MutableEventDispatcherProvider({
containerProvider: getContainerProvider()
}))
Sets the global EventDispatcherProvider instance
Call this once at application startup after setting up the container provider. The event dispatcher uses the container provider to resolve listener instances.