From 20eb0257f1179099746dc1ca7d042f9d13b31879 Mon Sep 17 00:00:00 2001 From: NickNaso Date: Thu, 17 Mar 2022 16:28:07 +0100 Subject: [PATCH] doc: added some comments to ClassPropertyDescriptor. --- 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