superstruct icon indicating copy to clipboard operation
superstruct copied to clipboard

Unexpected behaviour when combining `assign` + `refine`

Open john-rodewald opened this issue 1 year ago • 1 comments

I have an object-shaped struct that was created with refine and a custom validation handler. I want to extend this struct with additional fields. If I use assign, my validation handler seems to be skipped. Is this intended behaviour? If so, what is the proper way to do this?

I've created a minimal example to illustrate the issue I'm facing.

https://codesandbox.io/s/loving-sunset-zdvs6r?file=/index.js

john-rodewald avatar Jun 20 '23 13:06 john-rodewald