isourclosure
Returns true for executor-created or tracked functions.
Syntax
isourclosure(fn: function) -> boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
fn | function | The function or callback to use. |
Returns
| Type | Description |
|---|---|
boolean | True for executor-created or tracked functions |
Description
isourclosure is part of the Closures library. Closure helpers operate on live Luau function objects. Hooks redirect future calls through the replacement closure and return the previous implementation.
The call is a predicate: it inspects the current state and returns a boolean without modifying anything.
The aliases checkclosure(fn), isexecutorclosure(fn), isexecutorfunction(fn) resolve to the same implementation.
Example
local fn = newcclosure(function() end)
print(isourclosure(fn), checkclosure(fn), isexecutorclosure(fn))
Notes
- Aliases:
checkclosure(fn),isexecutorclosure(fn),isexecutorfunction(fn). - Closure operations act on live Luau function objects; installed hooks remain active until restored.