Upsert seems to give me an error about returning type any?
Been reading through the create t3 app. Working to understand prisma, zod, and router. I created a Model like the following:
when attempting to create a router I do:
But VSCode is telling me:
Unsafe Return of any typed value.I was thinking it would inherit a type of the model? I wasnt sure if it is related to me using typescript-eslint, BUT i didnt see other samples on the prisma website?
3 Replies
I been working on this throughout the night, but i still dont understand why Theos sample is properly returning a type, but this sample isnt.
I did the prisma db push, and the npm build to see if that resolved things, but it didnt.
Is it just vscode giving you issues or does it fail to build
It is vscode giving me errors, so it doesnt recognize types. It does seem like it builds. I was thinking that maybe there is something wrong with my typescript-eslint, but i didnt see any flags in the create-t3 sample Example.ts file.
So it seems to understand one but not the other is kinda weird, which is while it seems that the linter doesnt seem to understand it, why is it an isolated case.