Unsafe return of any typed value, using prisma upsert
Hi all;
I'm getting a lot of warnings in my IDE in this code;
Its saying that "Unsafe assignment of an
How do i fix this, and what does the error mean?
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 errorHow do i fix this, and what does the error mean?

