@@ -81,7 +81,7 @@ export declare abstract class Model<T> extends Hooks {
8181 * @param {Object } [options]
8282 * @param {Boolean } [options.override=false]
8383 */
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 ;
8585
8686 /**
8787 * 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 {
194194 *
195195 * @see {Sequelize#query}
196196 */
197- static findAll < T extends Model < T > > ( options ?: IFindOptions ) : Promise < T [ ] > ;
197+ static findAll < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < T [ ] > ;
198198
199- static all < T extends Model < T > > ( optionz ?: IFindOptions ) : Promise < T [ ] > ;
199+ static all < T extends Model < T > > ( options ?: IFindOptions < T > ) : Promise < T [ ] > ;
200200
201201 /**
202202 * Search for a single instance by its primary key. This applies LIMIT 1, so the listener will
203203 * always be called with a single instance.
204204 */
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 > ;
206206
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 > ;
208208
209209 /**
210210 * Search for a single instance. This applies LIMIT 1, so the listener will always be called with a single
211211 * instance.
212212 */
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 > ;
214214
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 > ;
216216
217217 /**
218218 * Run an aggregation method on the specified field
@@ -267,9 +267,9 @@ export declare abstract class Model<T> extends Hooks {
267267 * without
268268 * profiles will be counted
269269 */
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 } > ;
271271
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 } > ;
273273
274274 /**
275275 * Find the maximum value of field
0 commit comments