bcangussu
bcangussu
TTCTheo's Typesafe Cult
Created by bcangussu on 5/3/2023 in #questions
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
}
})
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?
4 replies
TTCTheo's Typesafe Cult
Created by bcangussu on 11/29/2022 in #questions
Resize window for Stage Manager in MacOS
1 replies