Reproduction Code
type function repro()
return types.newfunction({ head = { types.any, types.number } }, { head = { types.boolean } })
end
local foo: { bar: repro<> } = {
bar = function(self: any, n: number): boolean
return true
end
}
foo.bar(foo, 2)
foo:bar(2)
Using the luau-lsp extension, the tooltip doesn't skip the first argument when writing out methods defined by a type function.
In comparison to Roblox Studio, which properly omits the first argument.
Expected Behavior
(this is by removing the typing from foo)
Note that the autocomplete does correctly only suggest that one argument is available while typing the method, as well as not having an "Argument count mismatch" error. It is only for the tooltip that doesn't skip the first argument properly.