Skip to content

Commit 8274875

Browse files
mhdawsontargos
authored andcommitted
doc: fix up N-API doc
* Add missing N-API version info * Fix N-API version info for napi_extended_error_info PR-URL: #30254 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent 67e9985 commit 8274875

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

doc/api/n-api.md

+22-18
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,8 @@ is provided which returns a `napi_extended_error_info` structure.
727727
The format of the `napi_extended_error_info` structure is as follows:
728728

729729
<!-- YAML
730-
added: v10.6.0
731-
napiVersion: 4
730+
added: v8.0.0
731+
napiVersion: 1
732732
-->
733733

734734
```C
@@ -1367,7 +1367,7 @@ napiVersion: 1
13671367
```C
13681368
NAPI_EXTERN napi_status napi_create_reference(napi_env env,
13691369
napi_value value,
1370-
int initial_refcount,
1370+
uint32_t initial_refcount,
13711371
napi_ref* result);
13721372
```
13731373

@@ -1410,7 +1410,7 @@ napiVersion: 1
14101410
```C
14111411
NAPI_EXTERN napi_status napi_reference_ref(napi_env env,
14121412
napi_ref ref,
1413-
int* result);
1413+
uint32_t* result);
14141414
```
14151415

14161416
* `[in] env`: The environment that the API is invoked under.
@@ -1431,7 +1431,7 @@ napiVersion: 1
14311431
```C
14321432
NAPI_EXTERN napi_status napi_reference_unref(napi_env env,
14331433
napi_ref ref,
1434-
int* result);
1434+
uint32_t* result););
14351435
```
14361436

14371437
* `[in] env`: The environment that the API is invoked under.
@@ -1838,6 +1838,7 @@ structure, in most cases using a `TypedArray` will suffice.
18381838
#### napi_create_date
18391839
<!-- YAML
18401840
added: v11.11.0
1841+
napiVersion: 5
18411842
-->
18421843

18431844
```C
@@ -2517,6 +2518,7 @@ This API returns various properties of a `DataView`.
25172518
#### napi_get_date_value
25182519
<!-- YAML
25192520
added: v11.11.0
2521+
napiVersion: 5
25202522
-->
25212523

25222524
```C
@@ -3137,6 +3139,7 @@ This API checks if the `Object` passed in is a buffer.
31373139
### napi_is_date
31383140
<!-- YAML
31393141
added: v11.11.0
3142+
napiVersion: 5
31403143
-->
31413144

31423145
```C
@@ -3803,12 +3806,12 @@ napiVersion: 1
38033806
-->
38043807

38053808
```C
3806-
napi_status napi_call_function(napi_env env,
3807-
napi_value recv,
3808-
napi_value func,
3809-
int argc,
3810-
const napi_value* argv,
3811-
napi_value* result)
3809+
NAPI_EXTERN napi_status napi_call_function(napi_env env,
3810+
napi_value recv,
3811+
napi_value func,
3812+
size_t argc,
3813+
const napi_value* argv,
3814+
napi_value* result);
38123815
```
38133816

38143817
* `[in] env`: The environment that the API is invoked under.
@@ -4273,6 +4276,7 @@ JavaScript object becomes garbage-collected.
42734276

42744277
<!-- YAML
42754278
added: v8.0.0
4279+
napiVersion: 5
42764280
-->
42774281

42784282
```C
@@ -4539,13 +4543,13 @@ changes:
45394543
-->
45404544

45414545
```C
4542-
napi_status napi_make_callback(napi_env env,
4543-
napi_async_context async_context,
4544-
napi_value recv,
4545-
napi_value func,
4546-
int argc,
4547-
const napi_value* argv,
4548-
napi_value* result)
4546+
NAPI_EXTERN napi_status napi_make_callback(napi_env env,
4547+
napi_async_context async_context,
4548+
napi_value recv,
4549+
napi_value func,
4550+
size_t argc,
4551+
const napi_value* argv,
4552+
napi_value* result);
45494553
```
45504554

45514555
* `[in] env`: The environment that the API is invoked under.

0 commit comments

Comments
 (0)