From 0dab6a3d6cf8fa4a23d2e5260409e7502db7f0e2 Mon Sep 17 00:00:00 2001 From: Marly Fleitas 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 e5035c1..69fe92f 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