Marking Class Properties as Mutable in Effect Typescript
I noticed that my methods in classes cannot mutate properties:
Is there a way to mark some of the properties as mutable at all?
Is there a way to mark some of the properties as mutable at all?
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.
}
}