summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorcarsakiller <61925890+carsakiller@users.noreply.github.com>2022-09-08 19:47:00 -0400
committerGitHub <noreply@github.com>2022-09-08 19:47:00 -0400
commit00443e0e648786788666481ca446bfad732cbac8 (patch)
treea87c0164b05221f3e716ad60edc59f8c15c354cb /meta
parent8365eec4f4baa429d1f8a0d2f63132df8902db88 (diff)
downloadlua-language-server-00443e0e648786788666481ca446bfad732cbac8.zip
Replace old variable return syntax (#1540)
* fix: replace old variable return syntax #1539 * Update jit.status() Co-authored-by: Michael Martin <flrgh@protonmail.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/3rd/OpenResty/library/ngx.lua2
-rw-r--r--meta/3rd/skynet/library/skynet.lua2
-rw-r--r--meta/template/basic.lua8
-rw-r--r--meta/template/coroutine.lua5
-rw-r--r--meta/template/io.lua4
-rw-r--r--meta/template/jit.lua2
-rw-r--r--meta/template/string.lua10
7 files changed, 15 insertions, 18 deletions
diff --git a/meta/3rd/OpenResty/library/ngx.lua b/meta/3rd/OpenResty/library/ngx.lua
index 9c8794e9..0cbd94c7 100644
--- a/meta/3rd/OpenResty/library/ngx.lua
+++ b/meta/3rd/OpenResty/library/ngx.lua
@@ -4382,7 +4382,7 @@ function ngx.resp.get_headers(max_headers, raw) end
---@param ... ngx.thread.arg
---@return boolean ok
---@return ngx.thread.arg? result_or_error
----@return ...
+---@return any ...
function ngx.run_worker_thread(threadpool, module_name, func_name, arg1, arg2, ...)
end
diff --git a/meta/3rd/skynet/library/skynet.lua b/meta/3rd/skynet/library/skynet.lua
index 2ce96339..843722c4 100644
--- a/meta/3rd/skynet/library/skynet.lua
+++ b/meta/3rd/skynet/library/skynet.lua
@@ -159,7 +159,7 @@ end
---* 将 C 指针 或字符串转换成 Lua 数据
---@param msg lightuserdata | string
---@param sz? number
----@return ...
+---@return any ...
function skynet.unpack(msg, sz)
end
diff --git a/meta/template/basic.lua b/meta/template/basic.lua
index 4d718f79..262075c7 100644
--- a/meta/template/basic.lua
+++ b/meta/template/basic.lua
@@ -9,7 +9,7 @@ arg = {}
---@param v? T
---@param message? any
---@return T
----@return ...
+---@return any ...
function assert(v, message, ...) end
---@alias gcoptions
@@ -163,7 +163,7 @@ function pairs(t) end
---@param arg1? any
---@return boolean success
---@return any result
----@return ...
+---@return any ...
function pcall(f, arg1, ...) end
---#DES 'print'
@@ -269,7 +269,7 @@ function warn(message, ...) end
---@param err function
---@return boolean success
---@return any result
----@return ...
+---@return any ...
function xpcall(f, err) end
---#else
---#DES 'xpcall>5.2'
@@ -278,7 +278,7 @@ function xpcall(f, err) end
---@param arg1? any
---@return boolean success
---@return any result
----@return ...
+---@return any ...
function xpcall(f, msgh, arg1, ...) end
---#end
diff --git a/meta/template/coroutine.lua b/meta/template/coroutine.lua
index f9392831..6ff5d6de 100644
--- a/meta/template/coroutine.lua
+++ b/meta/template/coroutine.lua
@@ -34,8 +34,7 @@ function coroutine.close(co) end
---@param co thread
---@param val1? any
---@return boolean success
----@return any result
----@return ...
+---@return any ...
function coroutine.resume(co, val1, ...) end
---#DES 'coroutine.running'
@@ -62,7 +61,7 @@ function coroutine.wrap(f) end
---#DES 'coroutine.yield'
---@async
----@return ...
+---@return any ...
function coroutine.yield(...) end
return coroutine
diff --git a/meta/template/io.lua b/meta/template/io.lua
index ba1e9a02..66a77d38 100644
--- a/meta/template/io.lua
+++ b/meta/template/io.lua
@@ -72,7 +72,7 @@ function io.popen(prog, mode) end
---#DES 'io.read'
---@param ... readmode
---@return any
----@return ...
+---@return any ...
---@nodiscard
function io.read(...) end
@@ -135,7 +135,7 @@ function file:lines(...) end
---#DES 'file:read'
---@param ... readmode
---@return any
----@return ...
+---@return any ...
---@nodiscard
function file:read(...) end
diff --git a/meta/template/jit.lua b/meta/template/jit.lua
index 6397505e..c88377ed 100644
--- a/meta/template/jit.lua
+++ b/meta/template/jit.lua
@@ -26,7 +26,7 @@ function jit.off(func, recursive) end
function jit.flush(func, recursive) end
---@return boolean status
----@return ...
+---@return string ...
---@nodiscard
function jit.status() end
diff --git a/meta/template/string.lua b/meta/template/string.lua
index 47f0f49e..447aadc2 100644
--- a/meta/template/string.lua
+++ b/meta/template/string.lua
@@ -8,8 +8,7 @@ string = {}
---@param s string
---@param i? integer
---@param j? integer
----@return integer
----@return ...
+---@return integer ...
---@nodiscard
function string.byte(s, i, j) end
@@ -17,7 +16,6 @@ function string.byte(s, i, j) end
---@param byte integer
---@param ... integer
---@return string
----@return ...
---@nodiscard
function string.char(byte, ...) end
@@ -35,7 +33,7 @@ function string.dump(f, strip) end
---@param plain? boolean
---@return integer start
---@return integer end
----@return ... captured
+---@return string|integer ... captured
---@nodiscard
function string.find(s, pattern, init, plain) end
@@ -87,7 +85,7 @@ function string.lower(s) end
---@param s string
---@param pattern string
---@param init? integer
----@return ... captured
+---@return string|integer|nil ...
---@nodiscard
function string.match(s, pattern, init) end
@@ -143,7 +141,7 @@ function string.sub(s, i, j) end
---@param fmt string
---@param s string
---@param pos? integer
----@return ...
+---@return any ...
---@return integer offset
---@nodiscard
function string.unpack(fmt, s, pos) end