Skip to content

Commit f2bb602

Browse files
authored
fix(typeorm): Temporary workaround to be able to use latest typescript with typeorm.
fixes error TS2321: Excessive stack depth comparing types 'any' and 'FindConditions<T>' More context on the issue: microsoft/TypeScript#21592 (comment) Related PR: typeorm#4470
1 parent 10a5182 commit f2bb602

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/find-options/FindConditions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {FindOperator} from "./FindOperator";
33
/**
44
* Used for find operations.
55
*/
6-
export type FindConditions<T> = {
7-
[P in keyof T]?: FindConditions<T[P]>|FindOperator<FindConditions<T[P]>>;
6+
export declare type FindConditions<T> = {
7+
[P in keyof T] ?: T[P] extends never
8+
? FindConditions<T[P]> | FindOperator<FindConditions<T[P]>>
9+
: FindConditions<T[P]> | FindOperator<FindConditions<T[P]>>;
810
};

0 commit comments

Comments
 (0)