Can `Schema.Class` Struct be Mutable?

Is it possible to make the Struct of a Schema.Class mutable? For context, the use case I am thinking of here is for a mutable Entity/Aggregate (DDD), whose attributes are a mix of Value Objects (immutable Schema) and primitives.

export class Person extends S.Class<Person>('Person')(
  S.mutable(
    S.Struct({
      name: S.String,
      age: S.Number,
      address: Address // an immutable value object Schema
    })
  )
) {}


Returns error:
Argument of type 'mutable<Struct<{ name: typeof String$; age: typeof Number$; }>>' is not assignable to parameter of type 'Fields | HasFields<Fields>'.
  Type 'mutable<Struct<{ name: typeof String$; age: typeof Number$; }>>' is missing the following properties from type 'Struct<Fields>': fields, records, make


I'm guessing I would just use a POJO here for my Entities/Aggregates with attributes composed of Schemas/Value objects? But figured I would ask in case there was a different/recommended solution.
Was this page helpful?