node-addon-api
node-addon-api copied to clipboard
Module for using Node-API from C++
Objects implemented using Napi::ObjectWrap do not seem to support the object spread syntax. The following code on an object implemented with Napi::ObjectWrap always creates an empty object. The two properties...
We currently do not have a test for testing the `Ref(Env env)` function attached to the TSFN class. But I am not too sure if this is the best way...
| class | methods | |-------------------------|----------------------------------------------------------------------------------------------------------------------------------| |TypedThreadSafeFunction | | ||TypedThreadSafeFunction New(napi_env env, ResourceString res, size_t maxQueueSize, size_t initThreadCnt, ContextType* ctx = nullptr) | | | TypedThreadSafeFunction New(napi_env env, const Object&...
Hello, I'm working on a pull request for a project using node-addon-api. When I create a lot of objects via AsyncWorker I get Segmentation faults. I traced some of them...
Hi, Building with clang-16 error `-Wenum-constexpr-conversion`: ``` napi.h:1173:7: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion] static_cast(-1); ^ 1 error...
Disclamer: I know very little about C++. When trying to convert an open source project from NAN to napi, I'm getting the following error when trying to ref a HandleScope...
| class | methods | |-------------------------|----------------------------------------------------------------------------------------------------------------------------------| |CallbackInfo | | || CallbackInfo(napi_env env, napi_callback_info info)| |Used by most test methods| Env() const| | | Value NewTarget() const| |Covered(function.cc) | bool IsConstructCall()...
| class | methods | |-------------------------|----------------------------------------------------------------------------------------------------------------------------------| |Maybe | | || IsNothing() | |Covered| IsJust() | |Covered| void Check() | |Defined as a macro which is used by most tests|T UnWrap()...
| class | methods | |-------------------------|----------------------------------------------------------------------------------------------------------------------------------| |ClassPropertyDescriptor | | |Covered| ClassPropertyDescriptor(napi_property_descriptor desc)| See addon_data.cc and addon_data.js
| class | methods | |-------------------------|----------------------------------------------------------------------------------------------------------------------------------| |CallbackInfo | | |Covered indirectly via call to Function::New| CallbackInfo(napi_env env, napi_callback_info info)| |Covered indreictly via call to create array buffers, etc| Napi::Env Env()...