The error is because FunctionTemplate::New()
expects an InvocationCallback
, which has a return
type of Handle<Value>
.
So, you'll have to return
something, but it can simply be Undefined()
:
Handle<Value> MyObject::something(const Arguments& args) {
HandleScope scope;
return scope.Close(Undefined());
}
This makes it equivalent to:
function something() {}
Which has an implicit return;
(or return undefined;
).