Created
July 12, 2022 21:44
-
-
Save rjhilgefort/5898573e80611ac4a2cfa9676db03001 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const poop = | |
({ prismaClient }: { prismaClient: PrismaClient }) => | |
<T extends Prisma.IncidentFindManyArgs>( | |
slackChannelId: ChannelId, | |
args?: Prisma.SelectSubset<T, Prisma.IncidentFindManyArgs>, | |
) => { | |
const args_ = { ...args, where: { slackChannelId } } as Prisma.SelectSubset< | |
T, | |
Prisma.IncidentFindManyArgs | |
> | |
return prismaClient.incident._findMany<T>(args_) | |
} | |
const pc = 'pc' as unknown as PrismaClient | |
poop({ prismaClient: pc })('hi', { | |
include: { canReports: true }, | |
}).then((x) => x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment