Help with Prisma Validator static evaluation

I am trying to build a helper function that will allow me to abstract away some deeply nested includes for a data type. However I'm trying to make this reusable like in the following snippet

export const helper = (include: boolean) => {
  return Prisma.validator<Prisma.SomeInclude>()({
    include: {
      someTable: include
    }
  })


The issue with this is that I wish it would correctly map when passing true to { include: { someTable: true } }. Any wizards that could help?
Was this page helpful?