We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5be3b6a commit 3f9bbfeCopy full SHA for 3f9bbfe
.changeset/sad-ideas-open.md
@@ -0,0 +1,5 @@
1
+---
2
+"effect": patch
3
4
+
5
+Fix the arbitrary generator for BigDecimal to allow negative scales.
packages/effect/src/Schema.ts
@@ -7888,7 +7888,7 @@ const bigDecimalPretty = (): pretty_.Pretty<bigDecimal_.BigDecimal> => (val) =>
7888
`BigDecimal(${bigDecimal_.format(bigDecimal_.normalize(val))})`
7889
7890
const bigDecimalArbitrary = (): LazyArbitrary<bigDecimal_.BigDecimal> => (fc) =>
7891
- fc.tuple(fc.bigInt(), fc.integer({ min: 0, max: 18 }))
+ fc.tuple(fc.bigInt(), fc.integer({ min: -18, max: 18 }))
7892
.map(([value, scale]) => bigDecimal_.make(value, scale))
7893
7894
/**
0 commit comments