Superstruct v0.15.0 Release Notes

Release Date: 2021-03-25 // 7 months ago
  • ๐Ÿ›  ###### FIXED

    Unions can now be coerced. Previously unions created a barrier in coercion such that structs nested inside unions would not have their coercion logic triggered, but this has been fixed.

    Assigning preserves type structs. Previously using the assign helper would implicitly convert type structs into object structs which wasn't expected and confusing, but this has been fixed.

Previous changes from v0.14.0


    The mask helper now works for nested objects. Previously it would only mask the properties at the top-level of a struct, however now it acts deeply. You can use it to define object structs once, but use them either strictly or loosely.

    ๐Ÿšš The masked coercion has been removed. This previously allowed you to mix in masking to a specific struct, but the mask helper is a more robust way to do this, and it doesn't force you to maintain two separate structs.