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 encountered this issue too, however, as far as I understand, generic return values, are considered objects and not classes, thus any added fields, won't propagate back to the classes prototype. At least for the language server.
It would be great, if one could add classes implicitly, I don't know however, how hard this is to implement.
Here is a workarround: Just add ---@class major above the LibStub:NewLibrary() call
---@classmajorlocallib=LibStub:NewLibrary("major", 1);
lib.table= {}
lib.number=1;
lib.string= {}
functionlib:func() end
Now, anywhere, where is LibStub:GetLibrary("major", 1); called, you will get the completion info.
P.S. A more precise issue title would be beneficial, e.g. "Generically created classes, won't work"
first file
second file
The text was updated successfully, but these errors were encountered: