Skip to content

Commit 1c7e980

Browse files
authored
Merge branch 'master' into master
2 parents 6b50b53 + 6b1e3ff commit 1c7e980

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/model/model/model.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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 | null, options?: AssociationActionOptions): Promise<unknown> {
54+
$set<R extends Model>(propertyKey: keyof this, instances: R | R[] | string[] | string | number[] | number | null, 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

Comments
 (0)