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> {
2020 static Napi::FunctionReference constructor;
2121 double _ value;
2222 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 );
2424};
2525
2626Napi::Object Example::Init(Napi::Env env, Napi::Object exports) {
@@ -52,12 +52,11 @@ Napi::Value Example::GetValue(const Napi::CallbackInfo &info) {
5252 return Napi::Number::New(env, this->_ value);
5353}
5454
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) {
5656 Napi::Env env = info.Env();
5757 // ...
5858 Napi::Number arg = value.As< Napi::Number > ();
5959 this->_ value = arg.DoubleValue();
60- return this->GetValue(info);
6160}
6261
6362// Initialize native add-on
You can’t perform that action at this time.
0 commit comments