Skip to content

Commit 6d08bdb

Browse files
committed
fix some annotation
1 parent ce570ee commit 6d08bdb

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

crates/code_analysis/src/db_index/type/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl LuaType {
261261
}
262262

263263
pub fn is_optional(&self) -> bool {
264-
matches!(self, LuaType::Nil | LuaType::Nullable(_))
264+
matches!(self, LuaType::Nil | LuaType::Nullable(_) | LuaType::Any)
265265
}
266266

267267
pub fn is_tuple(&self) -> bool {

resources/std/global.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ function ipairs(t) end
137137
---
138138
--- Lua does not check the consistency of binary chunks. Maliciously crafted
139139
--- binary chunks can crash the interpreter.
140-
---@overload fun(chunk:fun():string):any
141-
---@param chunk fun():string
140+
---@param chunk (fun():string) | string
142141
---@param chunkname? string
143142
---@param mode? string
144143
---@param env? any
144+
---@return fun():any
145145
function load(chunk, chunkname, mode, env) end
146146

147147

@@ -344,10 +344,10 @@ function setmetatable(table, metatable) end
344344
--- represents 10, 'B' represents 11, and so forth, with 'Z' representing 35. If
345345
--- the string `e` is not a valid numeral in the given base, the function
346346
--- returns **nil**.
347-
---@overload fun(e:string|number):number?
347+
---@overload fun(e:string|number):number
348348
---@param e string|number
349-
---@param base int
350-
---@return number?
349+
---@param base? int
350+
---@return number
351351
function tonumber(e, base) end
352352

353353
---

resources/std/math.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function math.log(x, base) end
102102
--- Returns the argument with the maximum value, according to the Lua operator
103103
--- `<`. (integer/float)
104104
---@param x number
105+
---@param ... number
105106
---@return number
106107
function math.max(x, ...) end
107108

@@ -114,6 +115,7 @@ math.maxinteger = nil
114115
--- Returns the argument with the minimum value, according to the Lua operator
115116
--- `<`. (integer/float)
116117
---@param x number
118+
---@param ... number
117119
---@return number
118120
function math.min(x, ...) end
119121

0 commit comments

Comments
 (0)