-
Notifications
You must be signed in to change notification settings - Fork 26
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
Inheritance not yet implemented #1
Comments
any plan for Inheritance ? |
Sorry, not yet, this requires node to provide inheritance support for the napi mechanism. Please refer to nodejs/node#38038 for more details. |
Hi, I've managed to make inheritance work in my lib node-addon-api-helper. It's complex due to the nature napi designed doesn't match C++ inheritance property. We need hold a pointer to base class in |
Any update on this? |
Sorry, not yet |
Due to the limitation of
node-addon-api
, this project has not implemented inheritance yet, so calling the method of superclass from subclass object will report an error, just likeRelated issues are discussed in the following two issues.
node-addon-api#229
node-addon-api#956
In order to temporarily solve this problem, I reexposed the superclass method that needs to be used on the subclass.
It is expected that
node-addon-api
can really support inheritance.The text was updated successfully, but these errors were encountered: