Unsafe return of any typed value, using prisma upsert

Hi all;

I'm getting a lot of warnings in my IDE in this code;

setTheoryModule: protectedProcedure .input(z.object({ moduleName: z.string(), state: z.boolean() })) .mutation(async ({ input, ctx }) => { const user = ctx.session.user.id; const { moduleName, state } = input; const setTheoryModule = await ctx.prisma.theoryProgress.upsert({ where: { userId: user, moduleName: moduleName, }, create: { userId: user, moduleName: moduleName, state: state, }, update: { state: state, }, }); return setTheoryModule; }),

Its saying that "Unsafe assignment of an
any
value." is the error

How do i fix this, and what does the error mean?
Screenshot_2023-01-29_at_13.17.57.png
Was this page helpful?