From 44103ad050bd768d3d882c790b501c53f5e61c96 Mon Sep 17 00:00:00 2001 From: Yassine Date: Fri, 26 Jan 2024 13:29:12 +0100 Subject: [PATCH] fix: service find method return type --- src/internal.types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal.types.ts b/src/internal.types.ts index f36f6ba..580b6e4 100644 --- a/src/internal.types.ts +++ b/src/internal.types.ts @@ -1,7 +1,7 @@ import type { Paginated, PaginationOptions } from '@feathersjs/feathers'; -export type PaginatedOrArray = P extends { paginate: false } +export type PaginatedOrArray = P extends { paginate?: false } ? R[] : P extends { paginate: PaginationOptions } ? Paginated - : (Paginated | R[]); + : Paginated;