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 want to try creating an Event enum to use for the registering Event method, but enum doesn't seem to support key table values
If it can be completed normally like this
but
If you define a variable or parameter as an enumeration, lls will not know what value it has
What I want is to use extend like class, like --- @ class Event: {functionName: string,...}
but enum does not seem to support extend
Additional Notes
No response
The text was updated successfully, but these errors were encountered:
Currently @enum only support value types (string / number / boolean) but not reference type (table / function).
(I don't know if this is the accurate way to describe them)
And when you use (literal) table as enum values, luals seems only recognize them as a generic table, without knowing its content
=> thus you have no completion inside the function with @param event Event, because luals only treat Event as @alias Event table|table (?)
Workaround
I think I have found a workaround to attach the class type to it:
Issue Description
I want to try creating an Event enum to use for the registering Event method, but enum doesn't seem to support key table values



If it can be completed normally like this
but
If you define a variable or parameter as an enumeration, lls will not know what value it has
What I want is to use extend like class, like --- @ class Event: {functionName: string,...}
but enum does not seem to support extend
Additional Notes
No response
The text was updated successfully, but these errors were encountered: