From a2c40a5040315ada0ff752baa5bec4701d84fded Mon Sep 17 00:00:00 2001 From: Yuuki-Sakura Date: Sat, 27 May 2023 13:34:46 +0800 Subject: [PATCH] Revert "fix: for null type" This reverts commit 0e0feb57f7596e2012021426e0334faadef9ed72. --- src/find-options/FindReturnType.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/find-options/FindReturnType.ts b/src/find-options/FindReturnType.ts index 3ba84e6985..f779f27df8 100644 --- a/src/find-options/FindReturnType.ts +++ b/src/find-options/FindReturnType.ts @@ -12,9 +12,9 @@ type TruthyKeys = { [K in keyof T]: true extends T[K] ? K : T[K] extends object ? K : never }[keyof T] -type ExtractUndefined = Exclude> +type ExtractNil = Exclude> -type ArrayType = Array | ExtractUndefined +type ArrayType = Array | ExtractNil export type FindReturnType< Entity extends ObjectLiteral, @@ -58,10 +58,6 @@ export type FindReturnType< ? FindReturnType : Entity[R] : Entity[R] - } & { - [R in Select extends FindOptionsSelectByString - ? Select[number] - : never]: Entity[R] } & { [R in Relation extends FindOptionsRelationByString ? never @@ -82,4 +78,8 @@ export type FindReturnType< ? FindReturnType : Entity[R] : Entity[R] + } & { + [R in Select extends FindOptionsSelectByString + ? Select[number] + : never]: Entity[R] }