Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
koskimas committed Sep 25, 2019
1 parent f1e210b commit 46c3105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"pg": "^7.12.1",
"prettier": "1.18.2",
"sqlite3": "^4.1.0",
"typescript": "3.5.3",
"typescript": "^3.6.3",
"vuepress": "1.0.4"
},
"nyc": {
Expand Down
5 changes: 2 additions & 3 deletions typings/objection/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,13 @@ declare namespace Objection {
/**
* Just like PartialModelObject but this is applied recursively to relations.
*/
type PartialModelGraph<T> = {
type PartialModelGraph<M, T = M & GraphParameters> = {
[K in NonFunctionPropertyNames<T>]?: Exclude<T[K], undefined> extends Model
? PartialModelGraph<Exclude<T[K], undefined>>
: Exclude<T[K], undefined> extends Array<infer I>
? (I extends Model ? PartialModelGraph<I>[] : (T[K] | NonPrimitiveValue))
: (T[K] | NonPrimitiveValue);
} &
GraphParameters;
};

/**
* Extracts the model type from a query builder type QB.
Expand Down

0 comments on commit 46c3105

Please sign in to comment.