import { createContainer } from '@evyweb/ioctopus'; import { DI_RETURN_TYPES, DI_SYMBOLS } from '@/di/types'; import { IInstrumentationService } from '@/src/application/services/instrumentation.service.interface'; import { createAuthenticationModule } from './modules/authentication.module'; const ApplicationContainer = createContainer(); ApplicationContainer.load(Symbol('AuthenticationModule'), createAuthenticationModule()); export function getInjection( symbol: K ): DI_RETURN_TYPES[K] { const instrumentationService = ApplicationContainer.get( DI_SYMBOLS.IInstrumentationService ); return instrumentationService.startSpan( { name: '(di) getInjection', op: 'function', attributes: { symbol: symbol.toString() }, }, () => ApplicationContainer.get(DI_SYMBOLS[symbol]) ); }