llvm-node
llvm-node copied to clipboard
Use explicit declarations over using NAN Macros
The Nan documentation suggests to declare methods explicitly over using the Nan Macros.
void MethodName(const Nan::FunctionCallbackInfo<v8::Value>& info) {
...
}
instead of
NAN_METHOD(MethodName {
...
}
The explicit declaration is suggested not only for JS method implementations but also for getters, setters...
The more explicit way has the advantage that many IDEs provide better IntelliSense and is generally either understood by humble humans as well.
It is, therefore, probably advisable to migrate the existing code base to use explicit method declarations.