11import { WhereOptions , LoggingOptions , SearchPathOptions , col , and , or , FindOptionsAttributesArray ,
22 literal } from 'sequelize' ;
3- import { Model } from "../models/Model" ;
43import { IScopeIncludeOptions } from "./IScopeIncludeOptions" ;
4+ import { ModelClassGetter } from "../types/ModelClassGetter" ;
55
66/* tslint:disable:array-type */
77/* tslint:disable:max-line-length */
@@ -33,16 +33,16 @@ export interface IScopeFindOptions extends LoggingOptions, SearchPathOptions {
3333 * If your association are set up with an `as` (eg. `X.hasMany(Y, { as: 'Z }`, you need to specify Z in
3434 * the as attribute when eager loading Y).
3535 */
36- include ?: Array < ( ( ) => typeof Model ) | IScopeIncludeOptions > ;
36+ include ?: Array < ModelClassGetter | IScopeIncludeOptions > ;
3737
3838 /**
3939 * Specifies an ordering. If a string is provided, it will be escaped. Using an array, you can provide
4040 * several columns / functions to order by. Each element can be further wrapped in a two-element array. The
4141 * first element is the column / function to order by, the second is the direction. For example:
4242 * `order: [['name', 'DESC']]`. In this way the column will be escaped, but the direction will not.
4343 */
44- order ?: string | col | literal | Array < string | number | ( ( ) => typeof Model ) | { model : ( ( ) => typeof Model ) , as ?: string } > |
45- Array < string | col | literal | Array < string | number | ( ( ) => typeof Model ) | { model : ( ( ) => typeof Model ) , as ?: string } > > ;
44+ order ?: string | col | literal | Array < string | number | ModelClassGetter | { model : ModelClassGetter , as ?: string } > |
45+ Array < string | col | literal | Array < string | number | ModelClassGetter | { model : ModelClassGetter , as ?: string } > > ;
4646
4747 /**
4848 * Limit the results
@@ -59,7 +59,7 @@ export interface IScopeFindOptions extends LoggingOptions, SearchPathOptions {
5959 * Postgres also supports transaction.LOCK.KEY_SHARE, transaction.LOCK.NO_KEY_UPDATE and specific model
6060 * locks with joins. See [transaction.LOCK for an example](transaction#lock)
6161 */
62- lock ?: string | { level : string , of : ( ( ) => typeof Model ) } ;
62+ lock ?: string | { level : string , of : ModelClassGetter } ;
6363
6464 /**
6565 * Return raw result. See sequelize.query for more information.
0 commit comments