diff --git a/doc/api/n-api.md b/doc/api/n-api.md index d635ccba26af37..abf08013e54019 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -4649,8 +4649,13 @@ napi_status napi_async_init(napi_env env, ``` * `[in] env`: The environment that the API is invoked under. -* `[in] async_resource`: An optional object associated with the async work +* `[in] async_resource`: Object associated with the async work that will be passed to possible `async_hooks` [`init` hooks][]. + In order to retain ABI compatibility with previous versions, + passing `NULL` for `async_resource` will not result in an error, however, + this will result incorrect operation of async hooks for the + napi_async_context created. Potential issues include + loss of async context when using the AsyncLocalStorage API. * `[in] async_resource_name`: Identifier for the kind of resource that is being provided for diagnostic information exposed by the `async_hooks` API.