islclosure
Checks whether a function is a Luau closure.
Syntax
Signature
islclosure(Function: function) -> booleanAliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Function | function | Function to inspect. |
Returns
| Type | Description |
|---|---|
boolean | True for a Luau closure. |
Notes
Passing a value that is not a function raises an argument error.
Example
Luau
local Result = islclosure(function() return 42 end)
print(Result)