Very good news...since svelte 5.31.0 you can now assign `$state` and `$derived` to the class properties within the constructor of class

```ts
class Operator {
constructor(operation, initial) {
this.input = $state(initial);
this.output = $derived(operation(this.input));
}
}
```

πŸš€πŸ§‘

Comments