Skip to content

Commit 62ff691

Browse files
Trottaddaleax
authored andcommitted
doc: clarify napi_property_attributes text
* Rearrange sentence to avoid ambiguity whether the entire sentence applies to a method in a JS class or just the "but not" part * Use serial comma * Correct spelling of _configurable_ PR-URL: #35253 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent a8971f8 commit 62ff691

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/n-api.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3792,10 +3792,10 @@ They can be one or more of the following bitflags:
37923792
* `napi_static`: The property will be defined as a static property on a class as
37933793
opposed to an instance property, which is the default. This is used only by
37943794
[`napi_define_class`][]. It is ignored by `napi_define_properties`.
3795-
* `napi_default_method`: The property is configureable, writeable but not
3796-
enumerable like a method in a JS class.
3797-
* `napi_default_property`: The property is writable, enumerable and configurable
3798-
like a property set via JS code `obj.key = value`.
3795+
* `napi_default_method`: Like a method in a JS class, the property is
3796+
configurable and writeable, but not enumerable.
3797+
* `napi_default_property`: Like a property set via assignment in JavaScript, the
3798+
property is writable, enumerable, and configurable.
37993799

38003800
#### napi_property_descriptor
38013801

0 commit comments

Comments
 (0)