Skip to content

Commit

Permalink
Merge pull request #1078 from Ginden/master
Browse files Browse the repository at this point in the history
fix: allow to use @InjectConnection and @InjectEntityManager as property decorators
  • Loading branch information
kamilmysliwiec authored Jan 17, 2022
2 parents b953e63 + 62f5ebf commit 0d36ed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/common/typeorm.decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ export const InjectRepository = (

export const InjectConnection: (
connection?: Connection | ConnectionOptions | string,
) => ParameterDecorator = (
) => ReturnType<typeof Inject> = (
connection?: Connection | ConnectionOptions | string,
) => Inject(getConnectionToken(connection));

export const InjectEntityManager: (
connection?: Connection | ConnectionOptions | string,
) => ParameterDecorator = (
) => ReturnType<typeof Inject> = (
connection?: Connection | ConnectionOptions | string,
) => Inject(getEntityManagerToken(connection));

0 comments on commit 0d36ed7

Please sign in to comment.