Skip to content

Commit 6a2e7ff

Browse files
authored
Merge pull request #908 from phanen/loadlib-types
fix(types): package.loadlib return `nil, err` when fail
2 parents 45eccb2 + 91fc937 commit 6a2e7ff

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

crates/emmylua_code_analysis/resources/std/debug.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ function debug.gethook(thread) end
9494
--- with a name for the current function, if a reasonable name can be found,
9595
--- and the expression `debug.getinfo(print)` returns a table with all available
9696
--- information about the `print` function.
97-
---@overload fun(f: int|function, what?: debuglib.InfoWhat):debuglib.DebugInfo
97+
---@overload fun(f: int|function, what?: debuglib.InfoWhat):debuglib.DebugInfo?
9898
---@param thread thread
9999
---@param f integer|function
100100
---@param what? debuglib.InfoWhat
101-
---@return debuglib.DebugInfo
101+
---@return debuglib.DebugInfo?
102102
---@nodiscard
103103
function debug.getinfo(thread, f, what) end
104104

crates/emmylua_code_analysis/resources/std/package.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ package.loaded = {}
7777
--- systems that support the `dlfcn` standard).
7878
---@param libname string
7979
---@param funcname string
80-
---@return fun():nil
80+
---@return function?, string?
8181
function package.loadlib(libname, funcname) end
8282

8383
---

0 commit comments

Comments
 (0)