summaryrefslogtreecommitdiff
path: root/script/core/hover
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/hover')
-rw-r--r--script/core/hover/arg.lua6
-rw-r--r--script/core/hover/return.lua3
2 files changed, 5 insertions, 4 deletions
diff --git a/script/core/hover/arg.lua b/script/core/hover/arg.lua
index c2c6a105..c9c81a85 100644
--- a/script/core/hover/arg.lua
+++ b/script/core/hover/arg.lua
@@ -34,15 +34,15 @@ local function asFunction(source, oop)
args[#args+1] = ('%s%s: %s'):format(
name,
optionalArg(arg) and '?' or '',
- infer.viewType(arg)
+ infer.viewType(arg, 'any')
)
elseif arg.type == '...' then
args[#args+1] = ('%s: %s'):format(
'...',
- infer.viewType(arg)
+ infer.viewType(arg, 'any')
)
else
- args[#args+1] = ('%s'):format(infer.viewType(arg))
+ args[#args+1] = ('%s'):format(infer.viewType(arg, 'any'))
end
::CONTINUE::
end
diff --git a/script/core/hover/return.lua b/script/core/hover/return.lua
index f34f364e..e48febf3 100644
--- a/script/core/hover/return.lua
+++ b/script/core/hover/return.lua
@@ -64,8 +64,9 @@ local function asFunction(source)
for i = 1, num do
local rtn = compiler.getReturnOfFunction(source, i)
local doc = docs[i]
+ local name = doc and doc.name and doc.name[1] and (doc.name[1] .. ': ')
local text = ('%s%s%s'):format(
- doc and doc.name[1] or '',
+ name or '',
infer.viewType(rtn),
doc and doc.optional and '?' or ''
)