-
Hey there folks, really hope you're all doing well. Suppose I have the following Lua code: ---@class (exact) Arguments
---@field source string: The source file path to copy.
---@field destination string: The destination file path to copy to.
---@field owner string?: The owner of the file.
---Copies a file.
---@param args Arguments
function copy(args) end When calling e.g. However, is there a way to:
Here's an example of how this looks in Go: And after running this quick fix, we have: Importantly, the order of arguments are filled in exactly as defined. Thank you so much in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I believe luals has no such features (both 1 & 2) currently. And specifically displaying fields in the order they are defined may not fit how luals actually works 🤔 . In luals, a
---@class Test
---@field a string
---@class Test
---@field b integer
Since a |
Beta Was this translation helpful? Give feedback.
I believe luals has no such features (both 1 & 2) currently.
And specifically displaying fields in the order they are defined may not fit how luals actually works 🤔 . In luals, a
@class
annotation can be defined multiple times in multiple files, that's for defining corresponding fields in different sub files of a large class. For example:Test
class =>Since a
@class
is allowed to be defined multiple times, and more importantly in different files, I believe there is no defined order concept for it 😕