@@ -234,6 +234,50 @@ One or more of `napi_property_attributes`.
234
234
Returns ` Napi::PropertyDescriptor ` object that represents a static method of a
235
235
JavaScript class.
236
236
237
+ ### StaticMethod
238
+
239
+ Creates property descriptor that represents a static method of a JavaScript class.
240
+
241
+ ``` cpp
242
+ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod (Symbol name,
243
+ StaticVoidMethodCallback method,
244
+ napi_property_attributes attributes = napi_default,
245
+ void* data = nullptr);
246
+ ```
247
+
248
+ - `[in] name`: Napi:Symbol that represents the name of a static
249
+ method for the class.
250
+ - `[in] method`: The native function that represents a static method of a
251
+ JavaScript class.
252
+ - `[in] attributes`: The attributes associated with a particular property.
253
+ One or more of `napi_property_attributes`.
254
+ - `[in] data`: User-provided data passed into method when it is invoked.
255
+
256
+ Returns `Napi::PropertyDescriptor` object that represents the static method of a
257
+ JavaScript class.
258
+
259
+ ### StaticMethod
260
+
261
+ Creates property descriptor that represents a static method of a JavaScript class.
262
+
263
+ ```cpp
264
+ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
265
+ StaticMethodCallback method,
266
+ napi_property_attributes attributes = napi_default,
267
+ void* data = nullptr);
268
+ ```
269
+
270
+ method for the class.
271
+ - ` [in] name ` : Napi: Symbol that represents the name of a static.
272
+ - ` [in] method ` : The native function that represents a static method of a
273
+ JavaScript class.
274
+ - ` [in] attributes ` : The attributes associated with a particular property.
275
+ One or more of ` napi_property_attributes ` .
276
+ - ` [in] data ` : User-provided data passed into method when it is invoked.
277
+
278
+ Returns ` Napi::PropertyDescriptor ` object that represents a static method of a
279
+ JavaScript class.
280
+
237
281
### StaticAccessor
238
282
239
283
Creates property descriptor that represents a static accessor property of a
@@ -261,6 +305,32 @@ is invoked.
261
305
Returns `Napi::PropertyDescriptor` object that represents a static accessor
262
306
property of a JavaScript class.
263
307
308
+ ### StaticAccessor
309
+
310
+ Creates property descriptor that represents a static accessor property of a
311
+ JavaScript class.
312
+
313
+ ```cpp
314
+ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticAccessor(Symbol name,
315
+ StaticGetterCallback getter,
316
+ StaticSetterCallback setter,
317
+ napi_property_attributes attributes = napi_default,
318
+ void* data = nullptr);
319
+ ```
320
+
321
+ - ` [in] name ` : Napi: Symbol that represents the name of a static accessor.
322
+ - ` [in] getter ` : The native function to call when a get access to the property of
323
+ a JavaScript class is performed.
324
+ - ` [in] setter ` : The native function to call when a set access to the property of
325
+ a JavaScript class is performed.
326
+ - ` [in] attributes ` : The attributes associated with a particular property.
327
+ One or more of ` napi_property_attributes ` .
328
+ - ` [in] data ` : User-provided data passed into getter or setter when
329
+ is invoked.
330
+
331
+ Returns ` Napi::PropertyDescriptor ` object that represents a static accessor
332
+ property of a JavaScript class.
333
+
264
334
### InstanceMethod
265
335
266
336
Creates property descriptor that represents an instance method of a JavaScript class.
@@ -375,6 +445,32 @@ One or more of `napi_property_attributes`.
375
445
Returns `Napi::PropertyDescriptor` object that represents an instance accessor
376
446
property of a JavaScript class.
377
447
448
+ ### InstanceAccessor
449
+
450
+ Creates property descriptor that represents an instance accessor property of a
451
+ JavaScript class.
452
+
453
+ ```cpp
454
+ static Napi::PropertyDescriptor Napi::ObjectWrap::InstanceAccessor(Symbol name,
455
+ InstanceGetterCallback getter,
456
+ InstanceSetterCallback setter,
457
+ napi_property_attributes attributes = napi_default,
458
+ void* data = nullptr);
459
+ ```
460
+
461
+ - ` [in] name ` : The ` Napi::Symbol ` object whose value is used to identify the
462
+ instance accessor.
463
+ - ` [in] getter ` : The native function to call when a get access to the property of
464
+ a JavaScript class is performed.
465
+ - ` [in] setter ` : The native function to call when a set access to the property of
466
+ a JavaScript class is performed.
467
+ - ` [in] attributes ` : The attributes associated with the particular property.
468
+ One or more of ` napi_property_attributes ` .
469
+ - ` [in] data ` : User-provided data passed into getter or setter when this is invoked.
470
+
471
+ Returns ` Napi::PropertyDescriptor ` object that represents an instance accessor
472
+ property of a JavaScript class.
473
+
378
474
### StaticValue
379
475
380
476
Creates property descriptor that represents an static value property of a
@@ -394,6 +490,25 @@ to the napi_static attribute. One or more of `napi_property_attributes`.
394
490
Returns `Napi::PropertyDescriptor` object that represents an static value
395
491
property of a JavaScript class
396
492
493
+ ### StaticValue
494
+
495
+ Creates property descriptor that represents an static value property of a
496
+ JavaScript class.
497
+ ```cpp
498
+ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticValue(Symbol name,
499
+ Napi::Value value,
500
+ napi_property_attributes attributes = napi_default);
501
+ ```
502
+
503
+ - ` [in] name ` : The ` Napi::Symbol ` object whose value is used to identify the
504
+ name of the static property.
505
+ - ` [in] value ` : The value that's retrieved by a get access of the property.
506
+ - ` [in] attributes ` : The attributes to be associated with the property in addition
507
+ to the napi_static attribute. One or more of ` napi_property_attributes ` .
508
+
509
+ Returns ` Napi::PropertyDescriptor ` object that represents an static value
510
+ property of a JavaScript class
511
+
397
512
### InstanceValue
398
513
399
514
Creates property descriptor that represents an instance value property of a
@@ -411,3 +526,21 @@ One or more of `napi_property_attributes`.
411
526
412
527
Returns `Napi::PropertyDescriptor` object that represents an instance value
413
528
property of a JavaScript class.
529
+
530
+ ### InstanceValue
531
+
532
+ Creates property descriptor that represents an instance value property of a
533
+ JavaScript class.
534
+ ```cpp
535
+ static Napi::PropertyDescriptor Napi::ObjectWrap::InstanceValue(Symbol name,
536
+ Napi::Value value,
537
+ napi_property_attributes attributes = napi_default);
538
+ ```
539
+
540
+ - ` [in] name ` : The ` Napi::Symbol ` object whose value is used to identify the
541
+ name of the property.
542
+ - ` [in] value ` : The value that's retrieved by a get access of the property.
543
+ - ` [in] attributes ` : The attributes to be associated with the property.
544
+ One or more of ` napi_property_attributes ` .
545
+
546
+ Returns ` Napi::PropertyDescriptor ` object that represents an instance value
0 commit comments