Skip to content

Commit 2bc335d

Browse files
Trottruyadorno
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 b62d9b4 commit 2bc335d

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
@@ -3789,10 +3789,10 @@ They can be one or more of the following bitflags:
37893789
* `napi_static`: The property will be defined as a static property on a class as
37903790
opposed to an instance property, which is the default. This is used only by
37913791
[`napi_define_class`][]. It is ignored by `napi_define_properties`.
3792-
* `napi_default_method`: The property is configureable, writeable but not
3793-
enumerable like a method in a JS class.
3794-
* `napi_default_property`: The property is writable, enumerable and configurable
3795-
like a property set via JS code `obj.key = value`.
3792+
* `napi_default_method`: Like a method in a JS class, the property is
3793+
configurable and writeable, but not enumerable.
3794+
* `napi_default_property`: Like a property set via assignment in JavaScript, the
3795+
property is writable, enumerable, and configurable.
37963796

37973797
#### napi_property_descriptor
37983798

0 commit comments

Comments
 (0)