Hello, are there functions in Luau for typing related to:
function foo(n: number): string
return "hello"
end
local a: call<typeof(foo)>
function foo(n: number): string
return "hello"
end
local a: params<typeof(foo)>
Hello, are there functions in Luau for typing related to:
function foo(n: number): string
return "hello"
end
local a: call<typeof(foo)>
function foo(n: number): string
return "hello"
end
local a: params<typeof(foo)>
Edit: code comment
Yep! Just use type and more characters: ![]()
function foo(n: number): string
return "hello"
end
type ReturnType = typeof(foo)
local a: ReturnType
-- for parameters: manually
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.