Skip to content

Commit

Permalink
fix(typeorm): Temporary workaround to be able to use latest typescrip…
Browse files Browse the repository at this point in the history
…t 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
  • Loading branch information
siberex committed Jul 31, 2019
1 parent 10a5182 commit f2bb602
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/find-options/FindConditions.ts
Expand Up @@ -3,6 +3,8 @@ import {FindOperator} from "./FindOperator";
/**
* Used for find operations.
*/
export type FindConditions<T> = {
[P in keyof T]?: FindConditions<T[P]>|FindOperator<FindConditions<T[P]>>;
export declare type FindConditions<T> = {
[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 f2bb602

Please sign in to comment.