diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-18 17:06:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-18 17:06:34 +0800 |
commit | ab27e9a9d62b00a779712fbb7bddd9f2910707a2 (patch) | |
tree | dc82a7a1bc252d82748e413b5f8b4243d7bcd085 /meta/template/debug.lua | |
parent | 8b060037c9fd5961f8de6b9da674d5a29a77334e (diff) | |
download | lua-language-server-ab27e9a9d62b00a779712fbb7bddd9f2910707a2.zip |
可选参数尽量写在变量名后面,与其他语言保持一致
Diffstat (limited to 'meta/template/debug.lua')
-rw-r--r-- | meta/template/debug.lua | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/meta/template/debug.lua b/meta/template/debug.lua index 87f9c118..0f360eb5 100644 --- a/meta/template/debug.lua +++ b/meta/template/debug.lua @@ -27,7 +27,7 @@ function debug.debug() end ---@return table function debug.getfenv(o) end ----@param co thread? +---@param co? thread ---@return function hook ---@return string mask ---@return integer count @@ -43,17 +43,17 @@ function debug.gethook(co) end ---|+'"r"' # `ftransfer` 和 `ntransfer` ---|+'"L"' # `activelines` ----@overload fun(f: integer|function, what: infowhat?):debuginfo +---@overload fun(f: integer|function, what?: infowhat):debuginfo ---@param thread thread ----@param f integer|function ----@param what infowhat? +---@param f integer|function +---@param what? infowhat ---@return debuginfo function debug.getinfo(thread, f, what) end ---@overload fun(f: integer|function, index: integer):string, any ---@param thread thread ----@param f integer|function ----@param index integer +---@param f integer|function +---@param index integer ---@return string name ---@return any value function debug.getlocal(thread, f, index) end @@ -65,7 +65,7 @@ function debug.getmetatable(object) end ---@return table function debug.getregistry() end ----@param f integer|function +---@param f integer|function ---@param up integer ---@return string name ---@return any value @@ -84,7 +84,7 @@ function debug.setcstacklimit(limit) end ---@generic T ---@param object T ----@param env table +---@param env table ---@return T object function debug.setfenv(object, env) end @@ -93,42 +93,42 @@ function debug.setfenv(object, env) end ---|+'"r"' ---|+'"l"' ----@overload fun(hook: function, mask: hookmask, count: integer?) +---@overload fun(hook: function, mask: hookmask, count?: integer) ---@param thread thread ----@param hook function ----@param mask hookmask ----@param count integer? +---@param hook function +---@param mask hookmask +---@param count? integer function debug.sethook(thread, hook, mask, count) end ---@overload fun(level: integer, index: integer, value: any):string ---@param thread thread ----@param level integer ----@param index integer ----@param value any +---@param level integer +---@param index integer +---@param value any ---@return string name function debug.setlocal(thread, level, index, value) end ---@generic T ---@param value T ----@param meta table +---@param meta table ---@return T value function debug.setmetatable(value, meta) end ----@param f function ----@param up integer +---@param f function +---@param up integer ---@param value any ---@return string name function debug.setupvalue(f, up, value) end ---@param udata userdata ---@param value any ----@param n integer +---@param n integer ---@return userdata udata function debug.setuservalue(udata, value, n) end ----@param thread thread ----@param message any? ----@param level integer? +---@param thread thread +---@param message? any +---@param level? integer ---@return string message function debug.traceback(thread, message, level) end |