From 45679130eab4efe19066dd55d71513a6ec208f1d Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Fri, 13 Mar 2026 23:14:07 +0800 Subject: fix: map array object items to table[] --- scripts/gen_annotations.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/gen_annotations.lua') diff --git a/scripts/gen_annotations.lua b/scripts/gen_annotations.lua index 08ed2310..d71c88b8 100644 --- a/scripts/gen_annotations.lua +++ b/scripts/gen_annotations.lua @@ -224,9 +224,9 @@ local function lua_type_for(prop) if t == 'array' then if prop.items and prop.items.type then if type(prop.items.type) == 'table' then - prop.items.type = 'any' + return 'any[]' end - return prop.items.type .. '[]' + return (prop.items.type == 'object' and 'table' or prop.items.type) .. '[]' end return 'any[]' end -- cgit v1.3