| 7 | |
| 8 | template <typename Getter> |
| 9 | inline PropertyDescriptor PropertyDescriptor::Accessor( |
| 10 | const char* utf8name, |
| 11 | Getter getter, |
| 12 | napi_property_attributes attributes, |
| 13 | void* /*data*/) { |
| 14 | using CbData = details::CallbackData<Getter, Napi::Value>; |
| 15 | // TODO: Delete when the function is destroyed |
| 16 | auto callbackData = new CbData({getter, nullptr}); |
| 17 | |
| 18 | return PropertyDescriptor({utf8name, |
| 19 | nullptr, |
| 20 | nullptr, |
| 21 | CbData::Wrapper, |
| 22 | nullptr, |
| 23 | nullptr, |
| 24 | attributes, |
| 25 | callbackData}); |
| 26 | } |
| 27 | |
| 28 | template <typename Getter> |
| 29 | inline PropertyDescriptor PropertyDescriptor::Accessor( |
nothing calls this directly
no test coverage detected