File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ class Example : public Napi::ObjectWrap<Example> {
3636Napi::Object Example::Init(Napi::Env env, Napi::Object exports) {
3737 // This method is used to hook the accessor and method callbacks
3838 Napi::Function func = DefineClass(env, "Example", {
39- InstanceMethod<&Example::GetValue>("GetValue"),
40- InstanceMethod<&Example::SetValue>("SetValue"),
41- StaticMethod<&Example::CreateNewItem>("CreateNewItem"),
39+ InstanceMethod<&Example::GetValue>("GetValue", static_cast<napi_property_attributes>(napi_writable | napi_configurable) ),
40+ InstanceMethod<&Example::SetValue>("SetValue", static_cast<napi_property_attributes>(napi_writable | napi_configurable) ),
41+ StaticMethod<&Example::CreateNewItem>("CreateNewItem", static_cast<napi_property_attributes>(napi_writable | napi_configurable) ),
4242 });
4343
4444 Napi::FunctionReference* constructor = new Napi::FunctionReference();
You can’t perform that action at this time.
0 commit comments