Overriding Arbitrary Annotations for BigDecimal in Nested Schemas

is it possible to override Arbitrary annotations of a specific schema within a larger schema? for example
const MyData = S.Struct({
  num: S.BigDecimal,
  val: S.String
})

The struct above can be nested in even another schema and so on. Is it possible to change the arbitrary for the BigDecimal at the MyData level without modifying the line 2 to become a BigDecimal with a custom arbitrary?
The usecase is that I have a bunch of schemas that are using BigDecimal, but the default BigDecimal uses integer as its scale arbitrary. This is too large and often cannot even be serialized to a string because the large scale will overflow the string length and gives a range error on this logic: https://github.com/Effect-TS/effect/blob/5392047b3398cb4ae82e87ec1d77279c23661e8a/packages/effect/src/BigDecimal.ts#L914
hence it would be the most convenient if I can override the arbitrary of all BigDecimals contained within a schema instead of creating a custom BigDecimal with an overriden one and always using that
Was this page helpful?