From b9ca719888acde64d77cf64eb1f1ffc7ec73f879 Mon Sep 17 00:00:00 2001 From: Adarsh Singh Date: Sat, 5 Apr 2025 00:46:22 +0530 Subject: [PATCH] fix: sort by type signature fixed in read many --- src/core/Dao.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/Dao.ts b/src/core/Dao.ts index 540f416..70a970e 100644 --- a/src/core/Dao.ts +++ b/src/core/Dao.ts @@ -20,12 +20,12 @@ import { ErrorCode, Result, ResultWithCount, WithCount } from "./result"; export type _QueryDeepPartialEntity = { [P in keyof T]?: - | (T[P] extends Array - ? Array<_QueryDeepPartialEntity> - : T[P] extends ReadonlyArray - ? ReadonlyArray<_QueryDeepPartialEntity> - : _QueryDeepPartialEntity) - | (() => string); + | (T[P] extends Array + ? Array<_QueryDeepPartialEntity> + : T[P] extends ReadonlyArray + ? ReadonlyArray<_QueryDeepPartialEntity> + : _QueryDeepPartialEntity) + | (() => string); }; export interface QueryOption { @@ -44,7 +44,7 @@ export interface QueryOption { /** * Field on which the order should be applied */ - field?: keyof BaseEntity; + field?: keyof BaseEntity | keyof E; /** * Where condition */ @@ -81,8 +81,8 @@ export type ReadManyOption = QueryOption; export type Class = | { - new (): T; - } + new(): T; + } | Function; /**