Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(types): add missing transaction typescript types (v6-beta) #11620
Pull Request check-list
Description of change
As stated in the sequelize docs (https://sequelize.org/master/class/lib/transaction.js~Transaction.html#static-get-LOCK), when performing find operations, a lock property can be passed, and that can be either
The TypeScript types were failing when trying to pass a boolean value to
This PR adds those missing types.
Link to existing issue: #11178 (comment)
@@ Coverage Diff @@ ## master #11620 +/- ## ======================================= Coverage 96.26% 96.26% ======================================= Files 94 94 Lines 9190 9190 ======================================= Hits 8847 8847 Misses 343 343
papb left a comment
Please add at least one test to make sure your implementation works as intended and to prevent regressions in the future.
Testing the TypeScript typings consists simply on checking if some code can be compiled. In other words, a typings test is just some TS code that should compile. What it does when executed is irrelevant, the test is simply to compile it without errors, as can be seen in our CI configuration (using
Let me know if you need further help!
No. This depends on what branch you opened the PR into. In this case:
Since this PR is for
I think it's a good idea to have this change on v5 as well, so if you could open another PR with the same changes but targeting the
About v4, note that we didn't provide typescript typings by then, so this fix does not apply to v4. Typings for v4 exist but are unofficial and kept in the DefinitelyTyped package called @types/sequelize.
Ah, nice. I'll open the PR for v5 now. Thanks for all the info/help.