-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
Description
Describe the problem
I have a class that is entirely static (only static properties and methods). I cannot declare a $state
property, either with a field initializer or in a static initialization block. In both cases, Svelte complains that:
_Error: CompileError: state_invalid_placement:
$state(...)
can only be used as a variable declaration initializer or a class field
Of course, this is a class field, it's just that it's a static field, which seems to be unsupported for some reason.
Describe the proposed solution
Support static class fields.
Importance
would make my life easier
Zolo101, hanszoons, markpsiano, thirtythreeforty, lordvcs and 5 more