You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
typescript definition: function inside operator inside where #11079
Argument of type'{ [Op.iLike]: Fn; }' is not assignable to parameter of type'LogicType'.
Type '{ [Op.iLike]: Fn; }' is not assignable to type'WhereOperators'.
Types of property '[Op.iLike]' are incompatible.
Type 'Fn' is not assignable to type'string | Literal | AnyOperator | AllOperator | undefined'.
Property '[Op.all]' is missing intype'Fn' but required intype'AllOperator'.ts(2345)
model.d.ts(137, 3): '[Op.all]' is declared here.
Environment
sequelize-typescript: 1.0.0-beta.3
Dialect:
mysql
[ X ] postgres
sqlite
mssql
any
Dialect library version: pg version 6.4.2
Database version: 9.6.12
Sequelize version: 5.8.10
Node Version: 8.11.4
OS: macOS 10.14.3
TypeScript version: 3.4.3 (or 3.3.3 same issue)
Tested with latest release:
No
[ X ] Yes, specify that version: 5.8.10
Reacted by Vlad, Pratik Chowdhury, Mohamed Mayallo, Theo Ephraim, Jhai Navarro and Nicolás Navarro Tapia
For those who reach this in the future, I was able to resolve the issue: attributes: [[fn("max", col("colC")), "theAlias"], "colA", "colB"]. It's noted in the TS definition, but it's challenging to read. Use an array for this function argument and pass an alias as the second argument.
This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂
Activity
DakotaLarson commentedon Aug 28, 2020
For those who reach this in the future, I was able to resolve the issue:
attributes: [[fn("max", col("colC")), "theAlias"], "colA", "colB"]. It's noted in the TS definition, but it's challenging to read. Use an array for this function argument and pass an alias as the second argument.github-actions commentedon Nov 9, 2021
This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂