@@ -81,7 +81,7 @@ export declare abstract class Model<T> extends Hooks {
81
81
* @param {Object } [options]
82
82
* @param {Boolean } [options.override=false]
83
83
*/
84
- static addScope ( name : string , scope : IFindOptions | Function , options ?: AddScopeOptions ) : void ;
84
+ static addScope < T extends Model < T > > ( name : string , scope : IFindOptions < T > | Function , options ?: AddScopeOptions ) : void ;
85
85
86
86
/**
87
87
* Apply a scope created in `define` to the model. First let's look at how to create scopes:
@@ -194,25 +194,25 @@ export declare abstract class Model<T> extends Hooks {
194
194
*
195
195
* @see {Sequelize#query}
196
196
*/
197
- static findAll < T extends Model < T > > ( options ?: IFindOptions ) : Promise < T [ ] > ;
197
+ static findAll < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < T [ ] > ;
198
198
199
- static all < T extends Model < T > > ( optionz ?: IFindOptions ) : Promise < T [ ] > ;
199
+ static all < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < T [ ] > ;
200
200
201
201
/**
202
202
* Search for a single instance by its primary key. This applies LIMIT 1, so the listener will
203
203
* always be called with a single instance.
204
204
*/
205
- static findById < T extends Model < T > > ( identifier ?: number | string , options ?: IFindOptions ) : Promise < T | null > ;
205
+ static findById < T extends Model < T > > ( identifier ?: number | string , options ?: IFindOptions < T > ) : Promise < T | null > ;
206
206
207
- static findByPrimary < T extends Model < T > > ( identifier ?: number | string , options ?: IFindOptions ) : Promise < T | null > ;
207
+ static findByPrimary < T extends Model < T > > ( identifier ?: number | string , options ?: IFindOptions < T > ) : Promise < T | null > ;
208
208
209
209
/**
210
210
* Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single
211
211
* instance.
212
212
*/
213
- static findOne < T extends Model < T > > ( options ?: IFindOptions ) : Promise < T | null > ;
213
+ static findOne < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < T | null > ;
214
214
215
- static find < T extends Model < T > > ( options ?: IFindOptions ) : Promise < T | null > ;
215
+ static find < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < T | null > ;
216
216
217
217
/**
218
218
* Run an aggregation method on the specified field
@@ -267,9 +267,9 @@ export declare abstract class Model<T> extends Hooks {
267
267
* without
268
268
* profiles will be counted
269
269
*/
270
- static findAndCount < T extends Model < T > > ( options ?: IFindOptions ) : Promise < { rows : T [ ] , count : number } > ;
270
+ static findAndCount < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < { rows : T [ ] , count : number } > ;
271
271
272
- static findAndCountAll < T extends Model < T > > ( options ?: IFindOptions ) : Promise < { rows : T [ ] , count : number } > ;
272
+ static findAndCountAll < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < { rows : T [ ] , count : number } > ;
273
273
274
274
/**
275
275
* Find the maximum value of field
0 commit comments