-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the bug
Static fields get converted into instance field/accessors.
Reproduction
<script>
class Test {
static value = $state(0)
}
</script>
<input bind:value={Test.value} /> {Test.value}
Output:
class Test {
#value = $.source(0);
get value() {
return $.get(this.#value);
}
set value(value) {
$.set(this.#value, value);
}
}
Correct output would probably be:
class Test {
static #value = $.source(0);
static get value() { return $.get(Test.#value); }
static set value(value) { $.set(Test.#value, value); }
}
Logs
No response
System Info
REPL
Severity
annoyance
gterras
Metadata
Metadata
Assignees
Labels
No labels