Is there any way to avoid this cast?
I specifically want to avoid the
as Promise<Array<Prisma.unified_applicationGetPayload<T>>> cast. Basically I want the caller to be able to pass in any argument they want. I'm creating the arguments by: public forProject<T extends Prisma.unified_applicationDefaultArgs>(
projectId: string,
payload?: T,
txn: Prisma.TransactionClient = this.prisma
) {
return txn.unified_application.findMany({ where: { projectId, ...payload } }) as Promise<
Array<Prisma.unified_applicationGetPayload<T>>
>
}as Promise<Array<Prisma.unified_applicationGetPayload<T>>>export const UNIFIED_APPLICATION_PAYLOAD = Prisma.validator<Prisma.unified_applicationDefaultArgs>()({