Skip to content

Commit bba8891

Browse files
isaacbrodskyIsaac Brodsky
authored and
Isaac Brodsky
committed
doc: n-api: out params for TypedArray info can be NULL
This is useful information to have for applications that don't need to read the other properties. The implementation checks for `nullptr`, see: https://github.com/nodejs/node/blob/master/src/js_native_api_v8.cc#L2879
1 parent dbc91de commit bba8891

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/n-api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,6 +2820,8 @@ napi_status napi_get_typedarray_info(napi_env env,
28202820
Returns `napi_ok` if the API succeeded.
28212821

28222822
This API returns various properties of a typed array.
2823+
2824+
Any of the out parameters may be `NULL` if that property is unneeded.
28232825

28242826
*Warning*: Use caution while using this API since the underlying data buffer
28252827
is managed by the VM.
@@ -2850,6 +2852,8 @@ napi_status napi_get_dataview_info(napi_env env,
28502852
to start projecting the `DataView`.
28512853

28522854
Returns `napi_ok` if the API succeeded.
2855+
2856+
Any of the out parameters may be `NULL` if that property is unneeded.
28532857

28542858
This API returns various properties of a `DataView`.
28552859

0 commit comments

Comments
 (0)