Open BribeFromTheHive opened 1 year ago
IMHO, having only one way to annotate the parameters is better. The proposal doesn't reduce the needed effort by much. Also, it introduced another new concept not existent in the current LuaCATS: ---@param?
- another way to annotate optional argument. I am against that.
IMHO, having only one way to annotate the parameters is better. The proposal doesn't reduce the needed effort by much. Also, it introduced another new concept not existent in the current LuaCATS:
---@param?
- another way to annotate optional argument. I am against that.
That is totally valid. I am only putting out opinions. I am leaning more towards TSTL for the longer term at this point, as I don’t think that EmmyLua’s JSDoc-type stuff is convenient for quick coding.
IMHO, having only one way to annotate the parameters is better. The proposal doesn't reduce the needed effort by much. Also, it introduced another new concept not existent in the current LuaCATS:
---@param?
- another way to annotate optional argument. I am against that.That is totally valid. I am only putting out opinions. I am leaning more towards TSTL for the longer term at this point, as I don’t think that EmmyLua’s JSDoc-type stuff is convenient for quick coding.
Check out teal
IMHO, having only one way to annotate the parameters is better. The proposal doesn't reduce the needed effort by much. Also, it introduced another new concept not existent in the current LuaCATS:
---@param?
- another way to annotate optional argument. I am against that.
---@param x integer
---@param y integer?
local function my_function(x, y)
end
``` why `?` on the `param`
It might be possible to support ---@type
. However, since it's only a syntax sugar proposal, I won't consider adding support for it at the moment.
I'd like to be able to do inlined type annotation for parameters. It doesn't currently seem to be possible. What I mean is, instead of this:
I'd like to be able to do this:
This would cut down on the boilerplate a bit and make the code cleaner.