Skip to content

Commit

Permalink
renaming like previous
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolovlazar committed Oct 30, 2024
1 parent 7187d72 commit 76b472d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions di/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ registerAuthenticationModule(ApplicationContainer);
registerUsersModule(ApplicationContainer);
registerTodosModule(ApplicationContainer);

export function getInjection<T extends keyof DI_RETURN_TYPES>(
key: T
export function getInjection<T extends keyof typeof DI_SYMBOLS>(
symbol: T
): DI_RETURN_TYPES[T] {
const instrumentationService =
ApplicationContainer.get<IInstrumentationService>(
Expand All @@ -30,8 +30,8 @@ export function getInjection<T extends keyof DI_RETURN_TYPES>(
{
name: '(di) getInjection',
op: 'function',
attributes: { symbol: key.toString() },
attributes: { symbol: symbol.toString() },
},
() => ApplicationContainer.get<DI_RETURN_TYPES[T]>(DI_SYMBOLS[key])
() => ApplicationContainer.get(DI_SYMBOLS[symbol])
);
}

0 comments on commit 76b472d

Please sign in to comment.