-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails with Prisma 4.11.0 due to new toFixed
method on DecimalJsLike
interface.
#90
Comments
@sethmiller Thanks for the report. I quickly looked into this and it seems that this is more work than I initially expected. Simply adding a I' don't know when I have the time to get to it but I'll definitly address this. |
No worries. Thanks for the quick reply! |
@sethmiller I have a fix for this problem that generally works but one of my tests is failing. If I try to pass an object like export const decimalJsLikeOne: DecimalJsLike = {
d: [1230000], // array of digits
e: -1, // exponent
s: 1, // sign
toFixed: () => '1230000',
}; via trpc it seems that the to fixed method gets stripped out. I don't know why but it works with can you please try it out on your end with |
When testing against my test repo, it is not able to resolve
The message is a little confusing since there is the type I haven't been able to test it beyond this simple use case, however (I haven't incorporated this package into a larger project just yet). |
Thanks for testing it out. I'll refine this a bit before officially releasing it. |
@sethmiller should be fixed now in the latest release |
I looked in the issues list and didn't find a duplicate of this issue.
Issue
Prisma added a
toFixed
method to the DecimalJsLike interface. This causes compilation to fail when usingzod-prisma-types
with the following error.This error is resolved by rolling Prisma back to
4.10.0
.Reproduction
I made a repo to reproduce the issue but it should work with any schema that has a Decimal column.
For convenience, the
schema.prisma
file isThe text was updated successfully, but these errors were encountered: