diff options
Diffstat (limited to 'meta/template/io.lua')
-rw-r--r-- | meta/template/io.lua | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/meta/template/io.lua b/meta/template/io.lua index d31027af..b2846878 100644 --- a/meta/template/io.lua +++ b/meta/template/io.lua @@ -41,7 +41,7 @@ function io.input(file) end ---#DES 'io.lines' ---@param filename string? ----@vararg readmode +---@param ... readmode ---@return fun():string|number function io.lines(filename, ...) end @@ -50,6 +50,7 @@ function io.lines(filename, ...) end ---@param mode openmode ---@return file*? ---@return string? errmsg +---@nodiscard function io.open(filename, mode) end ---#DES 'io.output' @@ -69,13 +70,15 @@ function io.output(file) end function io.popen(prog, mode) end ---#DES 'io.read' ----@vararg readmode +---@param ... readmode ---@return string|number ---@return ... +---@nodiscard function io.read(...) end ---#DES 'io.tmpfile' ---@return file* +---@nodiscard function io.tmpfile() end ---@alias filetype @@ -86,6 +89,7 @@ function io.tmpfile() end ---#DES 'io.type' ---@param file file* ---@return filetype +---@nodiscard function io.type(file) end ---#DES 'io.write' @@ -124,13 +128,14 @@ function file:close() end function file:flush() end ---#DES 'file:lines' ----@vararg readmode +---@param ... readmode ---@return fun():string|number function file:lines(...) end ---#DES 'file:read' ----@vararg readmode +---@param ... readmode ---@return string|number +---@nodiscard function file:read(...) end ---@alias seekwhence @@ -156,7 +161,7 @@ function file:seek(whence, offset) end function file:setvbuf(mode, size) end ---#DES 'file:write' ----@vararg string|number +---@param ... string|number ---@return file*? ---@return string? errmsg function file:write(...) end |