Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
fix: excessive stack depth [typeorm#4427]
Browse files Browse the repository at this point in the history
  • Loading branch information
haggholm committed Aug 28, 2019
1 parent 5f6bef7 commit c721261
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/find-options/FindConditions.ts
@@ -1,8 +1,11 @@
import {FindOperator} from "./FindOperator";
import { FindOperator } from "./FindOperator";

/**
* Used for find operations.
*/
export type FindConditions<T> = {
[P in keyof T]?: FindConditions<T[P]>|FindOperator<FindConditions<T[P]>>;
// @petter: https://github.com/typeorm/typeorm/issues/4427
[P in keyof T]?: T[P] extends never
? FindConditions<T[P]> | FindOperator<FindConditions<T[P]>>
: FindConditions<T[P]> | FindOperator<FindConditions<T[P]>>;
};

0 comments on commit c721261

Please sign in to comment.