Commit 7f3b2b2
n-api: add more property defaults
Add a default value for class method and js like property in enum
napi_property_attributes.
n-api currently offers only one default which is non configurable,
non writable, non enumerable - like Object.defineProperty(). While
this is formal correct the usual way to create properties in JS is
either by defining a class or use obj.prop = value.
The defaults from these variants are now backed into enum values.
PR-URL: #35214
Refs: nodejs/node-addon-api#811
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>1 parent 64ac5c6 commit 7f3b2b2
2 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3726 | 3726 | | |
3727 | 3727 | | |
3728 | 3728 | | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
3729 | 3735 | | |
3730 | 3736 | | |
3731 | 3737 | | |
| |||
3737 | 3743 | | |
3738 | 3744 | | |
3739 | 3745 | | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
3740 | 3754 | | |
3741 | 3755 | | |
3742 | 3756 | | |
| |||
3755 | 3769 | | |
3756 | 3770 | | |
3757 | 3771 | | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
3758 | 3776 | | |
3759 | 3777 | | |
3760 | 3778 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| |||
0 commit comments