-
-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@function
annotation for class prototype members
#2415
Comments
Lua doesn't have |
@Frityet We just need annotation like |
How would ---@type fun(c: T): R
local function f(c) end |
@Frityet We need to be able to define custom function types with full description of their params. --- @function myCustomFnType
--- @param xyz string my param
--- @param bar number[]|nil optional param
--- @type myCustomFnType
local _wtf = nil
_wtf("is going on?", { 99, 88 }) -- no error by LLS |
@function
annotation for class prototype members
Closing as duplicate #1456 |
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Linux
What is the issue affecting?
Annotations
Expected Behaviour
Note
This is not a bug, but a feature request
Consider an example above. Currently, there is no way to tell LLS to recognize prototype based class method as actual instance method. I request LLS to provide support for this field automatically or preferrably via ability to declare
@function
type with params description.Design consideration: in JSDoc for instance, there is
@public
tag, see: google-closure-compiler @publicWorkaround
Currently, it's possible to workaround the issue temporarily by
The text was updated successfully, but these errors were encountered: