Skip to content

Commit 1462de9

Browse files
Merge pull request sequelize#268 from intellix/get-return-generic
Change generic return type of $get from <R, R[]> to <R>
2 parents b80b935 + d98889a commit 1462de9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/models/Model.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ export declare abstract class Model<T extends Model<T>> extends Hooks {
444444
/**
445445
* Returns related instance (specified by propertyKey) of source instance
446446
*/
447-
$get<R extends Model<R>>(propertyKey: string, options?: any): Promise<R | R[]>; // TODO@robin options interface
447+
$get<R extends Model<R>>(propertyKey: string, options?: any): Promise<R>; // TODO@robin options interface
448448

449449
/**
450450
* Counts related instances (specified by propertyKey) of source instance

0 commit comments

Comments
 (0)