Discrepancy in docs vs typescript types for locks
See original GitHub issueWhat are you doing?
I am attempting to lock a table when I perform a find query. The documentation seems to have a discrepancy in how these locks can be created, however the typescript types do not sync up
The following will produce a type error:
await MigrationLock.findAll({
  where: { isLocked: false },
  transaction,
  lock: true,
});
See below for all of the typescript warnings that also seem to be valid code as stated in the docs here and here
 
 

To Reproduce Steps to reproduce the behavior:
- Define model MigrationLockusing typescript
- Try to provide lock: trueinfindAll
- See typescript error
What do you expect to happen?
I want to be able to have a type-safe find lock on a table
What is actually happening?
Typescript keeps yelling at me
Environment
Dialect:
- mysql
- postgres
- sqlite
- mssql
- any
Dialect library version: 10.4 Database version: 10.4 Sequelize version: 5.9.4 Node Version: v10.15.0 OS: OSX Mojave 10.14.5
If TypeScript related: TypeScript version: XXX Tested with latest release:
- No
- Yes, specify that version: 3.5.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
TSConfig Reference - Docs on every TSConfig option
In some cases where no type annotations are present, TypeScript will fall back to ... This will allow editors such as VS Code...
Read more >Typescript: Difference between => and : in interface function ...
There's no real difference here, you can use which one you feel more comfortable with. These may be effectively very similar, but they...
Read more >A Proposal For Type Syntax in JavaScript - TypeScript
Today we're excited to announce our support and collaboration on a new Stage 0 proposal to bring optional and erasable type syntax to ......
Read more >typescript-cheatsheet - GitHub Pages
A set of TypeScript related notes used for quick reference. The cheatsheet contains references to types, classes, decorators, and many other TypeScript ......
Read more >Top 50 TypeScript Interview Questions and Answers in 2023
TypeScript adds type support to JavaScript. ... wide range of IDEs that have excellent support for TypeScript, like Visual Studio & VS code, ......
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

@papb PR for this issue is here: https://github.com/sequelize/sequelize/pull/11620. Let me know if everything looks good or if I need to do something else. It’s my first time making a PR for this repo, so I might have missed something.
@aecorredor Ah, ok! Indeed looks like a bug. Thank you very much. I will fix the issue label