I write a Transaction method as typeorm offical document(https://github.com/typeorm/typeorm/blob/master/docs/decorator-reference.md#transaction-transactionmanager-and-transactionrepository)
the code is below:
@Transaction('some-db-connection')
public async savePhoto(record: DeepPartial<Photo>,
@TransactionManager() manager: EntityManager) {
return await manager.save<DeepPartial<Photo>>(record)
}
When I use this method in some where as below:
await someRepo.savePhoto(record)
Both VS Code and WebStorm report error as "Invalid number of arguments, expect 2". Can anyone knows how to let IDE do not report this error? Thanks!
P.S.
Although IDE report error, the code can be execute without error
All my code are TypeScript code in .ts files