Write documentation in table #2733
Unanswered
moodyfication
asked this question in
Q&A
Replies: 1 comment
-
sure ---@class A
---@field a integer
Class = {
---@param a integer
---@return A
new = function (a)
return { a = a }
end,
}
local a = Class.new(1) --<< `a` is of type `A`, you can see it in hover preview |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can I write DOC in the table?, such as:
Class = {
--- @param ....
--- @return ....
new = function ()
....
end
}
Beta Was this translation helpful? Give feedback.
All reactions