@@ -43,15 +43,15 @@ export abstract class Model<TModelAttributes extends {} = any, TCreationAttribut
4343 /**
4444 * Adds relation between specified instances and source instance
4545 */
46- $add < R extends Model < R > > ( propertyKey : string , instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: AssociationActionOptions ) : Promise < unknown > {
46+ $add < R extends Model > ( propertyKey : string , instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: AssociationActionOptions ) : Promise < unknown > {
4747 return this [ 'add' + capitalize ( propertyKey ) ] ( instances , options ) ;
4848 }
4949
5050 /**
5151 * Sets relation between specified instances and source instance
5252 * (replaces old relations)
5353 */
54- $set < R extends Model < R > > ( propertyKey : keyof this, instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: AssociationActionOptions ) : Promise < unknown > {
54+ $set < R extends Model > ( propertyKey : keyof this, instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: AssociationActionOptions ) : Promise < unknown > {
5555 return this [ 'set' + capitalize ( propertyKey as string ) ] ( instances , options ) ;
5656 }
5757
@@ -65,28 +65,28 @@ export abstract class Model<TModelAttributes extends {} = any, TCreationAttribut
6565 /**
6666 * Counts related instances (specified by propertyKey) of source instance
6767 */
68- $count < R extends Model < R > > ( propertyKey : string , options ?: AssociationCountOptions ) : Promise < number > {
68+ $count < R extends Model > ( propertyKey : string , options ?: AssociationCountOptions ) : Promise < number > {
6969 return this [ 'count' + capitalize ( propertyKey ) ] ( options ) ;
7070 }
7171
7272 /**
7373 * Creates instances and relate them to source instance
7474 */
75- $create < R extends Model < R > > ( propertyKey : string , values : any , options ?: AssociationCreateOptions ) : Promise < R > {
75+ $create < R extends Model > ( propertyKey : string , values : any , options ?: AssociationCreateOptions ) : Promise < R > {
7676 return this [ 'create' + capitalize ( propertyKey ) ] ( values , options ) ;
7777 }
7878
7979 /**
8080 * Checks if specified instances is related to source instance
8181 */
82- $has < R extends Model < R > > ( propertyKey : string , instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: AssociationGetOptions ) : Promise < boolean > {
82+ $has < R extends Model > ( propertyKey : string , instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: AssociationGetOptions ) : Promise < boolean > {
8383 return this [ 'has' + capitalize ( propertyKey ) ] ( instances , options ) ;
8484 }
8585
8686 /**
8787 * Removes specified instances from source instance
8888 */
89- $remove < R extends Model < R > > ( propertyKey : string , instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: any ) : Promise < any > {
89+ $remove < R extends Model > ( propertyKey : string , instances : R | R [ ] | string [ ] | string | number [ ] | number , options ?: any ) : Promise < any > {
9090 return this [ 'remove' + capitalize ( propertyKey ) ] ( instances , options ) ;
9191 }
9292
0 commit comments