summaryrefslogtreecommitdiff
path: root/meta/template
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-03-26 16:40:41 +0000
committerLewis Russell <lewis6991@gmail.com>2024-04-17 09:23:21 +0100
commit526d9296f589c77ccde4ed9d39d560623ae0e7f0 (patch)
tree9f846ea68437ed471990c697efe177bf22c26aea /meta/template
parent87aa5816903444cd192b752a72bc3ca86e70fb63 (diff)
downloadlua-language-server-526d9296f589c77ccde4ed9d39d560623ae0e7f0.zip
meta: improve typing for unpack
Fixes #1353
Diffstat (limited to 'meta/template')
-rw-r--r--meta/template/basic.lua7
1 files changed, 7 insertions, 0 deletions
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