MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / Accessor

Method Accessor

napi-inl.deprecated.h:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8template <typename Getter>
9inline 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
28template <typename Getter>
29inline PropertyDescriptor PropertyDescriptor::Accessor(

Callers

nothing calls this directly

Calls 1

PropertyDescriptorClass · 0.85

Tested by

no test coverage detected