neofrog.
neofrog.
PPrisma
Created by neofrog. on 8/4/2024 in #help-and-questions
Prisma type inference is returning weird types
hey! sorry been on holiday. Nope i didn't, its been a pain tbh
19 replies
PPrisma
Created by neofrog. on 8/4/2024 in #help-and-questions
Prisma type inference is returning weird types
what your showing me is exactly what i expect to happen, i dont want to be asserting. I created a completely blank typescript project with prisma and im still getting the weird types. Could it be anything to do with my tsconfig.json? { "compilerOptions": { "target": "ES2020", "module": "commonjs", "lib": ["ES2020"], "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "moduleResolution": "node", "typeRoots": ["node_modules/@types"], "types": ["node"] }, "include": ["src/*/.ts"], "exclude": ["node_modules"] }
19 replies
PPrisma
Created by neofrog. on 8/4/2024 in #help-and-questions
Prisma type inference is returning weird types
It’s happening all throughout my project, I’ve tried nuking node modules and cache, and reinstalling re-generating prisma types. Ive tried numerous different tsconfig setups. The only way i seem to be able to get it to work is asserting at every step along the way and even then it still is buggy as hell
19 replies
PPrisma
Created by neofrog. on 8/4/2024 in #help-and-questions
Prisma type inference is returning weird types
Im converting it because i created a new function to demonstrate my problem and it was just easier than changing it in the db. And yeah i get the same issue using it directly
19 replies
PPrisma
Created by neofrog. on 8/4/2024 in #help-and-questions
Prisma type inference is returning weird types
Shouldn’t it work without asserting?
19 replies
PPrisma
Created by neofrog. on 8/4/2024 in #help-and-questions
Prisma type inference is returning weird types
Apologies for all the weird underlines in my post, i edited it on my phone before i head to sleep
19 replies