mirror of https://github.com/sveltejs/svelte
parent
7e0a81d102
commit
152fe5019b
@ -1,11 +1,14 @@
|
||||
<script>
|
||||
class Foo {
|
||||
a = $state();
|
||||
a = $state(0);
|
||||
#b = $state();
|
||||
|
||||
foo = $derived({ bar: this.a * 2 });
|
||||
bar = $derived({ baz: this.foo });
|
||||
constructor() {
|
||||
this.a = 1;
|
||||
this.#b = 2;
|
||||
this.foo.bar = 3;
|
||||
this.bar = 4;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in new issue