Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add transaction property to TransactionOptions #10721

Closed
khongchi opened this issue Apr 8, 2019 · 1 comment
Closed

Please add transaction property to TransactionOptions #10721

khongchi opened this issue Apr 8, 2019 · 1 comment
Labels
released type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.

Comments

@khongchi
Copy link

khongchi commented Apr 8, 2019

What are you doing?

I am using a type script and I want to use a transaction. Please see the code below.

const parentTransaction = await sequelize.transaction();
...
const childTransaction = await sequelize.transaction({transaction: parentTransaction}); // error here

What do you expect to happen?

No error.

What is actually happening?

But An error occurs!

TS2345: Argument of type '{ transaction: Transaction; }' is not assignable to parameter of type 'TransactionOptions'.   Object literal may only specify known properties, and 'transaction' does not exist in type 'TransactionOptions'.

Solution

please add the transaction property to TransactionOptions

see below.
khongchi@5bda491

@SimonSchick SimonSchick added the type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense. label Apr 8, 2019
@sushantdhiman
Copy link
Contributor

🎉 This issue has been resolved in version 5.2.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released type: typescript For issues and PRs. Things that involve typescript, such as typings and intellisense.
Projects
None yet
Development

No branches or pull requests

3 participants