File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class User extends Model {
43
43
// actively include a relation.
44
44
public readonly projects? : Project [];
45
45
46
- public static associtations : {
46
+ public static associations : {
47
47
projects: Association <User , Project >;
48
48
};
49
49
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class User extends Model {
34
34
// actively include a relation.
35
35
public readonly projects ?: Project [ ] ;
36
36
37
- public static associtations : {
37
+ public static associations : {
38
38
projects : Association < User , Project > ;
39
39
} ;
40
40
}
@@ -133,7 +133,7 @@ async function stuff() {
133
133
} ) ;
134
134
135
135
const ourUser = await User . findByPk ( 1 , {
136
- include : [ User . associations . Project ] ,
136
+ include : [ User . associations . projects ] ,
137
137
rejectOnEmpty : true , // Specifying true here removes `null` from the return type!
138
138
} ) ;
139
139
console . log ( ourUser . projects ! [ 0 ] . name ) ; // Note the `!` null assertion since TS can't know if we included
You can’t perform that action at this time.
0 commit comments