llvm-node icon indicating copy to clipboard operation
llvm-node copied to clipboard

Use explicit declarations over using NAN Macros

Open MichaReiser opened this issue 7 years ago • 0 comments

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.

MichaReiser avatar Oct 31 '18 09:10 MichaReiser