Marking Class Properties as Mutable in Effect Typescript
I noticed that my methods in classes cannot mutate properties:
class Thing extends Schema.Class<Thing>('Thing')({ property: Schema.String.pipe(Schema.mutable)}) { public update() { this.property = "New Value" // ^ error TS2540: Cannot assign to 'property' because it is a read-only property. }}
class Thing extends Schema.Class<Thing>('Thing')({ property: Schema.String.pipe(Schema.mutable)}) { public update() { this.property = "New Value" // ^ error TS2540: Cannot assign to 'property' because it is a read-only property. }}
Is there a way to mark some of the properties as mutable at all?