Skip to content
Thread dispatchOverview

oth.get_hook

Provides metadata about a registered dispatch callback.

Details#

Returns the registered oth callback wrapper for a target, or nil if no live wrapper is available. The returned callable is not guaranteed to be identical to the Luau function originally supplied.

Examples#

Example

Luau
local target = newcclosure(function() return 1 end)
oth.hook(target, function() return 2 end)
print(type(oth.get_hook(target))) -- function
oth.unhook(target)