summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/service/telemetry.lua1
-rw-r--r--script/vm/doc.lua12
-rw-r--r--script/vm/type.lua3
-rw-r--r--script/vm/value.lua2
4 files changed, 11 insertions, 7 deletions
diff --git a/script/service/telemetry.lua b/script/service/telemetry.lua
index 2e52def2..211dff0e 100644
--- a/script/service/telemetry.lua
+++ b/script/service/telemetry.lua
@@ -90,6 +90,7 @@ local function pushErrorLog(link)
))
end
+---@type boolean?
local isValid = false
timer.wait(5, function ()
diff --git a/script/vm/doc.lua b/script/vm/doc.lua
index 6ee00192..31d7f0ff 100644
--- a/script/vm/doc.lua
+++ b/script/vm/doc.lua
@@ -90,10 +90,10 @@ end
---@return parser.object?
local function getDeprecated(value)
if not value.bindDocs then
- return false
+ return nil
end
if value._deprecated ~= nil then
- return value._deprecated
+ return value._deprecated or nil
end
for _, doc in ipairs(value.bindDocs) do
if doc.type == 'doc.deprecated' then
@@ -108,7 +108,7 @@ local function getDeprecated(value)
end
end
value._deprecated = false
- return false
+ return nil
end
---@return parser.object?
@@ -116,9 +116,9 @@ function vm.getDeprecated(value, deep)
if deep then
local defs = vm.getDefs(value)
if #defs == 0 then
- return false
+ return nil
end
- local deprecated = false
+ local deprecated
for _, def in ipairs(defs) do
if def.type == 'setglobal'
or def.type == 'setfield'
@@ -128,7 +128,7 @@ function vm.getDeprecated(value, deep)
or def.type == 'tableindex' then
deprecated = getDeprecated(def)
if not deprecated then
- return false
+ return nil
end
end
end
diff --git a/script/vm/type.lua b/script/vm/type.lua
index 15c94dfc..fd4c1a17 100644
--- a/script/vm/type.lua
+++ b/script/vm/type.lua
@@ -29,6 +29,9 @@ local function getNodeName(object)
if object.type == 'doc.type.table' then
return 'table'
end
+ if object.type == 'doc.type.array' then
+ return 'table'
+ end
return nil
end
diff --git a/script/vm/value.lua b/script/vm/value.lua
index d29ca9d0..13e27e59 100644
--- a/script/vm/value.lua
+++ b/script/vm/value.lua
@@ -141,7 +141,7 @@ function vm.getInteger(v)
end
---@param v vm.object?
----@return integer?
+---@return string?
function vm.getString(v)
if not v then
return nil