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

Method DefineProperty

napi-inl.h:1836–1844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1834}
1835
1836inline MaybeOrValue<bool> Object::DefineProperty(
1837 const PropertyDescriptor& property) const {
1838 napi_status status = napi_define_properties(
1839 _env,
1840 _value,
1841 1,
1842 reinterpret_cast<const napi_property_descriptor*>(&property));
1843 NAPI_RETURN_OR_THROW_IF_FAILED(_env, status, status == napi_ok, bool);
1844}
1845
1846inline MaybeOrValue<bool> Object::DefineProperties(
1847 const std::initializer_list<PropertyDescriptor>& properties) const {

Callers 4

InitFunction · 0.80
TestMethod · 0.80
DefineValuePropertyFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestMethod · 0.64