From 9bea434326d5e6c6fa355a51b6f232a503521a21 Mon Sep 17 00:00:00 2001 From: Nicola Del Gobbo Date: Thu, 31 Mar 2022 22:51:52 +0200 Subject: [PATCH] doc: added some comments to ClassPropertyDescriptor. (#1149) --- doc/class_property_descriptor.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/class_property_descriptor.md b/doc/class_property_descriptor.md index e5035c126..69fe92fa4 100644 --- a/doc/class_property_descriptor.md +++ b/doc/class_property_descriptor.md @@ -1,10 +1,18 @@ # Class property and descriptor -Property descriptor for use with `Napi::ObjectWrap::DefineClass()`. -This is different from the standalone `Napi::PropertyDescriptor` because it is -specific to each `Napi::ObjectWrap` subclass. -This prevents using descriptors from a different class when defining a new class -(preventing the callbacks from having incorrect `this` pointers). +Property descriptor for use with `Napi::ObjectWrap` and +`Napi::InstanceWrap`. This is different from the standalone +`Napi::PropertyDescriptor` because it is specific to each +`Napi::ObjectWrap` and `Napi::InstanceWrap` subclasses. +This prevents using descriptors from a different class when defining a new +class (preventing the callbacks from having incorrect `this` pointers). + +`Napi::ClassPropertyDescriptor` is a helper class created with +`Napi::ObjectWrap` and `Napi::InstanceWrap`. For more reference about it +see: + +- [InstanceWrap](./instance_wrap.md) +- [ObjectWrap](./object_wrap.md) ## Example