File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Example : public Napi::ObjectWrap<Example> {
20
20
static Napi::FunctionReference constructor;
21
21
double _ value;
22
22
Napi::Value GetValue(const Napi::CallbackInfo &info);
23
- Napi::Value SetValue(const Napi::CallbackInfo &info);
23
+ void SetValue(const Napi::CallbackInfo &info, const Napi::Value &value );
24
24
};
25
25
26
26
Napi::Object Example::Init(Napi::Env env, Napi::Object exports) {
@@ -52,12 +52,11 @@ Napi::Value Example::GetValue(const Napi::CallbackInfo &info) {
52
52
return Napi::Number::New(env, this->_ value);
53
53
}
54
54
55
- Napi::Value Example::SetValue(const Napi::CallbackInfo &info, const Napi::Value &value) {
55
+ void Example::SetValue(const Napi::CallbackInfo &info, const Napi::Value &value) {
56
56
Napi::Env env = info.Env();
57
57
// ...
58
58
Napi::Number arg = value.As< Napi::Number > ();
59
59
this->_ value = arg.DoubleValue();
60
- return this->GetValue(info);
61
60
}
62
61
63
62
// Initialize native add-on
You can’t perform that action at this time.
0 commit comments