Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use explicit declarations over using NAN Macros #66

Open
MichaReiser opened this issue Oct 31, 2018 · 0 comments
Open

Use explicit declarations over using NAN Macros #66

MichaReiser opened this issue Oct 31, 2018 · 0 comments

Comments

@MichaReiser
Copy link
Owner

MichaReiser commented Oct 31, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant