Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: update query deep partial TypeScript definition (#6085)
User should be able to pass function if field is an array
  • Loading branch information
sdomagala committed Sep 4, 2020
1 parent 16a2d80 commit 23110d1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/query-builder/QueryPartialEntity.ts
Expand Up @@ -11,7 +11,9 @@ export type QueryPartialEntity<T> = {
*/
export type QueryDeepPartialEntity<T> = {
[P in keyof T]?:
T[P] extends Array<infer U> ? Array<QueryDeepPartialEntity<U>> :
T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<QueryDeepPartialEntity<U>> :
QueryDeepPartialEntity<T[P]> | (() => string);
(
T[P] extends Array<infer U> ? Array<QueryDeepPartialEntity<U>> :
T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<QueryDeepPartialEntity<U>> :
QueryDeepPartialEntity<T[P]>
) | (() => string);
};

0 comments on commit 23110d1

Please sign in to comment.