diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-07-27 14:07:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 14:07:04 +0800 |
commit | a9adf80432cf686468994fc8e151081d5129d39e (patch) | |
tree | 229b66ea8c8d8fbbdfb702e727beb51b5ddbc150 /meta/template/string.lua | |
parent | 5fe53c7b08cf7ff21f62c5b2d7aa8148ecb27bf6 (diff) | |
parent | 8f09bd43cbf8f650ab857f0c5710f9d1ddc93de3 (diff) | |
download | lua-language-server-a9adf80432cf686468994fc8e151081d5129d39e.zip |
Merge pull request #2225 from C3pa/update-string-annotations
Update `string.dump` so it doesn't have strip argument in Lua 5.1 and 5.2
Diffstat (limited to 'meta/template/string.lua')
-rw-r--r-- | meta/template/string.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/template/string.lua b/meta/template/string.lua index b0acb5b8..c5fe6ab6 100644 --- a/meta/template/string.lua +++ b/meta/template/string.lua @@ -20,11 +20,18 @@ function string.byte(s, i, j) end function string.char(byte, ...) end ---#DES 'string.dump' +---#if VERSION >= 5.3 or JIT then ---@param f async fun(...):... ---@param strip? boolean ---@return string ---@nodiscard function string.dump(f, strip) end +---#else +---@param f async fun(...):... +---@return string +---@nodiscard +function string.dump(f) end +---#end ---#DES 'string.find' ---@param s string|number @@ -93,6 +100,7 @@ function string.match(s, pattern, init) end ---#DES 'string.pack' ---@param fmt string ---@param v1 string|number +---@param v2 string|number ---@param ... string|number ---@return string binary ---@nodiscard |