summaryrefslogtreecommitdiff
path: root/meta/template/io.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-17 14:45:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-17 14:45:49 +0800
commit5a9dd92de2e1caed7cc66c6448a0ee951b47bd4e (patch)
tree93db62825616f73e06ad8540c39493b330e612be /meta/template/io.lua
parent84c8c1500306eae1deccbad02e23c8e8186d452b (diff)
downloadlua-language-server-5a9dd92de2e1caed7cc66c6448a0ee951b47bd4e.zip
还是得把库名与类型名区分开来
Diffstat (limited to 'meta/template/io.lua')
-rw-r--r--meta/template/io.lua28
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/template/io.lua b/meta/template/io.lua
index 1576c2b6..4adb252a 100644
--- a/meta/template/io.lua
+++ b/meta/template/io.lua
@@ -1,9 +1,9 @@
---@meta
----@class io
----@field stdin file
----@field stdout file
----@field stderr file
+---@class io*
+---@field stdin file*
+---@field stdout file*
+---@field stderr file*
io = {}
---@alias openmode
@@ -20,7 +20,7 @@ io = {}
---| '"w+b"'
---| '"a+b"'
----@param file file?
+---@param file file*?
---@return boolean suc?
---@return exitcode exitcode?
---@return integer code?
@@ -28,8 +28,8 @@ function io.close(file) end
function io.flush() end
----@overload fun():file
----@param file string|file
+---@overload fun():file*
+---@param file string|file*
function io.input(file) end
---@param filename string?
@@ -39,12 +39,12 @@ function io.lines(filename, ...) end
---@param filename string
---@param mode openmode
----@return file?
+---@return file*?
---@return string errmsg?
function io.open(filename, mode) end
----@overload fun():file
----@param file string|file
+---@overload fun():file*
+---@param file string|file*
function io.output(file) end
---@alias popenmode
@@ -53,7 +53,7 @@ function io.output(file) end
---@param prog string
---@param mode popenmode?
----@return file?
+---@return file*?
---@return string errmsg?
function io.popen(prog, mode) end
@@ -62,18 +62,18 @@ function io.popen(prog, mode) end
---@return ...
function io.read(...) end
----@return file
+---@return file*
function io.tmpfile() end
---@alias filetype
---| '"file"'
---| '"closed file"'
---| 'nil'
----@param file file
+---@param file file*
---@return filetype
function io.type(file) end
----@return file
+---@return file*
---@return string errmsg?
function io.write(...) end