Currently when writing doc comments for functions, annotating types for @param tags seems quite limited. Consider the following snippet:
-- Concatenate two tables together.
--- @param t1 The first table to concatenate.
--- @param t2 { [string]: true } The first table to concatenate.
local function concatTable(t1: { [string]: true }, t2: { [string]: true }): { [string]: true }
local t = {}
for _, v in pairs(t1) do
table.insert(t, v)
end
for _, v in pairs(t2) do
table.insert(t, v)
end
return t
end
This results in the following function description:
When leaving the out the @param type, it should display the inline type annotation for the parameter in the function signature.
Doc comments are incompatible with Luau, if your intention is to use Moonwave, use multiline comments, Roblox LSP doesn't actually uses Moonwave but it uses EmmyLua
Currently when writing doc comments for functions, annotating types for
@param
tags seems quite limited. Consider the following snippet:This results in the following function description:
When leaving the out the
@param
type, it should display the inline type annotation for the parameter in the function signature.