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; /**