constructor(method: Function)
View sourceCreates a method entry around a function reference.
Class
Entry that wraps one function registered as runtime behavior for a
TypeEntry.
A method entry retains the original function reference. The
MethodEntry#call method invokes that function with an optional
positional argument list; the
wrapper does not add serialization or lookup metadata of its own.
function add(a, b) {
return a + b
}
const method = new MethodEntry(add)
method.method === add // true
method.call([2, 3]) // 5constructor(method: Function)Creates a method entry around a function reference.
call<T extends unknown[]>(args?: [...T[]]): unknownCalls the stored function with args spread as positional arguments.
Omitting args invokes the function with no arguments. The return value
and thrown errors come directly from the stored function.