File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -223,15 +223,17 @@ declare namespace Objection {
223223 /**
224224 * Just like PartialModelObject but this is applied recursively to relations.
225225 */
226- type PartialModelGraph < M , T = M & GraphParameters > = {
227- [ K in DataPropertyNames < T > ] ?: Defined < T [ K ] > extends Model
228- ? PartialModelGraph < Defined < T [ K ] > >
229- : Defined < T [ K ] > extends Array < infer I >
230- ? I extends Model
231- ? PartialModelGraph < I > [ ]
232- : Expression < T [ K ] >
233- : Expression < T [ K ] > ;
234- } ;
226+ type PartialModelGraph < M , T = M & GraphParameters > = T extends any
227+ ? {
228+ [ K in DataPropertyNames < T > ] ?: Defined < T [ K ] > extends Model
229+ ? PartialModelGraph < Defined < T [ K ] > >
230+ : Defined < T [ K ] > extends Array < infer I >
231+ ? I extends Model
232+ ? PartialModelGraph < I > [ ]
233+ : Expression < T [ K ] >
234+ : Expression < T [ K ] > ;
235+ }
236+ : never ;
235237
236238 /**
237239 * Extracts the property names (excluding relations) of a model class.
You can’t perform that action at this time.
0 commit comments