diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-23 00:42:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-23 00:42:10 +0800 |
commit | ec1f746a71dfb981f093bf00322db75d559fd6b6 (patch) | |
tree | 71730d2de455bf7cd8a9481a554a56cddf47f341 /meta | |
parent | 6e00db5b51646ad91c5ee5598897cad7f8d65915 (diff) | |
download | lua-language-server-ec1f746a71dfb981f093bf00322db75d559fd6b6.zip |
fix optional parameters
Diffstat (limited to 'meta')
-rw-r--r-- | meta/template/io.lua | 4 | ||||
-rw-r--r-- | meta/template/string.lua | 2 | ||||
-rw-r--r-- | meta/template/table.lua | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/meta/template/io.lua b/meta/template/io.lua index b2846878..b1fe5a9e 100644 --- a/meta/template/io.lua +++ b/meta/template/io.lua @@ -47,7 +47,7 @@ function io.lines(filename, ...) end ---#DES 'io.open' ---@param filename string ----@param mode openmode +---@param mode? openmode ---@return file*? ---@return string? errmsg ---@nodiscard @@ -157,7 +157,7 @@ function file:seek(whence, offset) end ---#DES 'file:setvbuf' ---@param mode vbuf ----@param size integer +---@param size? integer function file:setvbuf(mode, size) end ---#DES 'file:write' diff --git a/meta/template/string.lua b/meta/template/string.lua index 0e0d0537..a115648e 100644 --- a/meta/template/string.lua +++ b/meta/template/string.lua @@ -65,7 +65,7 @@ function string.gmatch(s, pattern, init) end ---@param s string ---@param pattern string ---@param repl string|table|function ----@param n integer +---@param n? integer ---@return string ---@return integer count ---@nodiscard diff --git a/meta/template/table.lua b/meta/template/table.lua index 02288342..a7fe68d2 100644 --- a/meta/template/table.lua +++ b/meta/template/table.lua @@ -52,7 +52,7 @@ function table.remove(list, pos) end ---#DES 'table.sort' ---@generic T ---@param list T[] ----@param comp fun(a: T, b: T):boolean +---@param comp? fun(a: T, b: T):boolean function table.sort(list, comp) end ---@version >5.2, JIT |