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> {
36
36
Napi::Object Example::Init(Napi::Env env, Napi::Object exports) {
37
37
// This method is used to hook the accessor and method callbacks
38
38
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) ),
42
42
});
43
43
44
44
Napi::FunctionReference* constructor = new Napi::FunctionReference();
You can’t perform that action at this time.
0 commit comments