We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, just trying converting some code from nan to n-api using this library and the docs have been pretty good except for this.
Napi::FunctionReference::Persistent is listed here: https://github.com/nodejs/node-addon-api/blob/44f0695533327a12548a5015c444a3a5d731bb5c/doc/function_reference.md#persistent
Napi::FunctionReference::Persistent
However the actual method is Napi::Persistent overloaded to take a Napi::Function as seen in the source code here:
Napi::Persistent
Napi::Function
node-addon-api/napi.h
Line 1130 in 44f0695
The mistake seems to have been introduced a few months ago in a docs tidy up: fc11c94#diff-9562158c05ed3ee744cdc12bad121e87L39
The same mistake seems to exist for all Persistent and Weak across Reference and its subclasses.
This could be part of the confusion in #392.
The text was updated successfully, but these errors were encountered:
@DuBistKomisch thanks for the report. Do you want to submit a PR to fix this up?
Sorry, something went wrong.
@mhdawson sure
Closing this issue as a PR to fix has landed (Thanks @DuBistKomisch).
No branches or pull requests
Hi, just trying converting some code from nan to n-api using this library and the docs have been pretty good except for this.
Napi::FunctionReference::Persistent
is listed here: https://github.com/nodejs/node-addon-api/blob/44f0695533327a12548a5015c444a3a5d731bb5c/doc/function_reference.md#persistentHowever the actual method is
Napi::Persistent
overloaded to take aNapi::Function
as seen in the source code here:node-addon-api/napi.h
Line 1130 in 44f0695
The mistake seems to have been introduced a few months ago in a docs tidy up: fc11c94#diff-9562158c05ed3ee744cdc12bad121e87L39
The same mistake seems to exist for all Persistent and Weak across Reference and its subclasses.
This could be part of the confusion in #392.
The text was updated successfully, but these errors were encountered: