Hi! Im currently trying to create an util function...
# orm-help
s
Hi! Im currently trying to create an util function “findOneBy” but i have a problem with Ts + Select. With my current implementation that function returns any | null sadparrot
Copy code
async findOneBy<T extends Prisma.UserSelect>(
    where: Prisma.UserWhereInput,
    select?: T,
  ) {
    return this.prisma.user.findFirst({
      where,
      select,
    });
  }