Repository navigation
fix(types): allow Op.not and Op.col in WhereOptions - #14087
remcohaszing wants to merge 1 commit into
Conversation
|
Thank you for the PR! We do have typings for I'd very much like to deprecate Current fix is incomplete, I actually have an active PR that tries to fully fix Would you be willing to join efforts and try to come up with |
|
My initial attempt to fix the type errors was to replace all occurrences of This is the code base I’m working on where I’m actively using Sequelize. It’s a monorepo with a package You can discover the Sequelize types related issues I’m running into by running: git clone https://gitlab.com/appsemble/appsemble.git
cd appsemble
yarn
yarn add typescript@latest
cd packages/server
yarn tscThere are some edge cases not fixed by this PR, but I could resolve them by rewriting the queries. |
They should be! If you have a query where
Thanks! I'll test #14022 against it and include tests for the failing cases |
|
I followed your steps but tsc didn't detect any issue (sequelize 6.16.1), are they in a different branch? |
|
My bad! Because git clone https://gitlab.com/appsemble/appsemble.git
cd appsemble
yarn
yarn add -W typescript@latest
cd packages/server
yarn tscIt’s getting late here, so I’m going offline now. I’ll provide an example where |
|
These are the steps to reproduce the issue about
|
The new TypeScript version uncovers some issues in Sequelize that need to be worked around. See sequelize/sequelize#14022 and sequelize/sequelize#14087 for details.
|
I'm back after a few days away, I'll try to take a look at this today |
|
I've managed to reproduce the issue with |
|
#14022 is ready, just waiting for reviews before merging :) There are typing tests for |
Pull Request Checklist
Please make sure to review and check all of these items:
yarn testoryarn test-DIALECTpass with this change (including linting)?Description Of Change
Define
Op.notandOp.colinWhereOptions.Todos