You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with the LSP and noticed errors for some of my Stimulus controllers.
Debugging a bit I noticed that the parser fails on them, because we use some empty public class fields like so:
import{Controller}from"@hotwired/stimulus";exportdefaultclassextendsController{someField;// this is just an example how we use them later, not related to the bugdoSomething(){this.someField="some value";}}
It does work if you set it with a value, like someField = "initial value".
I was playing around with the LSP and noticed errors for some of my Stimulus controllers.
Debugging a bit I noticed that the parser fails on them, because we use some empty public class fields like so:
someField = "initial value"
.static
in front of it also breaksIt fails on this line:
stimulus-parser/src/parser.ts
Line 45 in 31842f4
I guess those nodes don't have a
type
, so some other parsing exception should be added.Happy to help, but I don't have a good idea in what direction to go.
edit later that day: I made a PR that implements a possible fix in #21!
The text was updated successfully, but these errors were encountered: