Issue with mutable schema properties and object construction in Effect Typescript library

Question about mutable schema properties. I searched around here and saw some examples that I could not reproduce myself.

Namely when I have this schema:

const MySchema = Schema.Struct({
  identifier: Schema.NonEmptyString,
  args: Schema.mutable(Schema.Array(Schema.Unknown)),
}),


Then args are still readonly here, despite me making it mutable. Documentation, as far as I can understand, doesn't mention anything about that.

Then I figured that alright, I'll make the entire struct mutable, e.g

 const MySchema = Schema.mutable(
  Schema.Struct({
    identifier: Schema.NonEmptyString,
    args: Schema.Array(Schema.Unknown),
  }),
);


Which may work, perhaps, but I now lose the ability to do MySchema.make, so how would I construct an object now? I feel like I clearly have some misunderstanding about Schemas.
Was this page helpful?