diff --git a/meta/template/basic.lua b/meta/template/basic.lua index aed3085e5..3d59858da 100644 --- a/meta/template/basic.lua +++ b/meta/template/basic.lua @@ -7,7 +7,7 @@ arg = {} ---#DES 'assert' ---@generic T ---@param v T ----@param message any +---@param message? any ---@return T function assert(v, message) end diff --git a/meta/template/io.lua b/meta/template/io.lua index b2846878b..d5f5fd584 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 diff --git a/meta/template/string.lua b/meta/template/string.lua index 0e0d0537b..a115648e0 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 022883424..a7fe68d2c 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