diff options
author | carsakiller <61925890+carsakiller@users.noreply.github.com> | 2022-09-08 19:47:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 19:47:00 -0400 |
commit | 00443e0e648786788666481ca446bfad732cbac8 (patch) | |
tree | a87c0164b05221f3e716ad60edc59f8c15c354cb /meta/template | |
parent | 8365eec4f4baa429d1f8a0d2f63132df8902db88 (diff) | |
download | lua-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/template')
-rw-r--r-- | meta/template/basic.lua | 8 | ||||
-rw-r--r-- | meta/template/coroutine.lua | 5 | ||||
-rw-r--r-- | meta/template/io.lua | 4 | ||||
-rw-r--r-- | meta/template/jit.lua | 2 | ||||
-rw-r--r-- | meta/template/string.lua | 10 |
5 files changed, 13 insertions, 16 deletions
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 |