不要怂,就是干,撸起袖子干!

Commit c66663ed by Simon Schick Committed by GitHub

fix(typings): fn is assignable to where (#12040)

1 parent 5822bc79
Showing with 3 additions and 1 deletions
...@@ -110,7 +110,7 @@ export interface ScopeOptions { ...@@ -110,7 +110,7 @@ export interface ScopeOptions {
/** /**
* The type accepted by every `where` option * The type accepted by every `where` option
*/ */
export type WhereOptions = WhereAttributeHash | AndOperator | OrOperator | Literal | Where; export type WhereOptions = WhereAttributeHash | AndOperator | OrOperator | Literal | Fn | Where;
/** /**
* Example: `[Op.any]: [2,3]` becomes `ANY ARRAY[2, 3]::INTEGER` * Example: `[Op.any]: [2,3]` becomes `ANY ARRAY[2, 3]::INTEGER`
......
...@@ -291,6 +291,8 @@ where = whereFn('test', { ...@@ -291,6 +291,8 @@ where = whereFn('test', {
// Literal as where // Literal as where
where = literal('true') where = literal('true')
where = fn('LOWER', 'asd')
MyModel.findAll({ MyModel.findAll({
where: literal('true') where: literal('true')
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!