인수
function
필수
Function called by the returned Luau closure.
string
Optional debug name for the generated closure.
반환값
function
Generated Luau closure that executes return the original function(..) and forwards arguments to the original function.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns a Luau closure that calls the provided function. The first argument must be a function.
newlclosure(func: function, debugName?: string): function
local function add(a, b)
return a + b
end
local wrapped = newlclosure(add, "add")
print(wrapped(2, 3))
print(islclosure(wrapped))