mirror of https://github.com/sveltejs/svelte
pull/15820/head
parent
8c7ad3c5a3
commit
15c7b143f9
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "constructor_state_reassignment",
|
||||||
|
"message": "A state field declaration in a constructor must be the first assignment, and the only one that uses a rune",
|
||||||
|
"start": {
|
||||||
|
"line": 4,
|
||||||
|
"column": 2
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 4,
|
||||||
|
"column": 24
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,6 @@
|
|||||||
|
export class Counter {
|
||||||
|
constructor() {
|
||||||
|
this.count = -1;
|
||||||
|
this.count = $state(0);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue