From 526d9296f589c77ccde4ed9d39d560623ae0e7f0 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Tue, 26 Mar 2024 16:40:41 +0000 Subject: meta: improve typing for unpack Fixes #1353 --- meta/template/basic.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta/template/basic.lua b/meta/template/basic.lua index 4a9360fd..75cd1dee 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -339,3 +339,10 @@ function xpcall(f, msgh, arg1, ...) end ---@return T ... ---@nodiscard function unpack(list, i, j) end + +---@version 5.1 +---@generic T1, T2, T3, T4, T5, T6, T7, T8, T9 +---@param list {[1]: T1, [2]: T2, [3]: T3, [4]: T4, [5]: T5, [6]: T6, [7]: T7, [8]: T8, [9]: T9 } +---@return T1, T2, T3, T4, T5, T6, T7, T8, T9 +---@nodiscard +function unpack(list) end -- cgit v1.2.3