Skip to content

Commit 94d4cc3

Browse files
committed
Don't modify the meta data
1 parent 9f546ba commit 94d4cc3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tools/love-api.lua

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,9 @@ local function buildFunction(func, node, typeName)
156156
for _, param in ipairs(func.variants[1].arguments or {}) do
157157
for paramName in param.name:gmatch '[%a_][%w_]*' do
158158
params[#params+1] = paramName
159-
if param.type == 'table' then
160-
param.default = isTableOptional(param.table)
161-
end
162159
text[#text+1] = ('---@param %s%s %s # %s'):format(
163160
paramName,
164-
param.default == nil and '' or '?',
161+
(param.type == 'table' and isTableOptional(param.table) or param.default) == nil and '' or '?',
165162
buildType(param),
166163
param.description
167164
)

0 commit comments

Comments
 (0)