node_api_basic_env
typeexperimentaljs_native_api.hThis variant of napi_env is passed to synchronous finalizers (node_api_basic_finalize). There is a subset of Node-APIs which accept a parameter of type node_api_basic_env as their first argument.
Stability: 1 - Experimental
This variant of napi_env is passed to synchronous finalizers
(node_api_basic_finalize). There is a subset of Node-APIs which accept
a parameter of type node_api_basic_env as their first argument. These APIs do
not access the state of the JavaScript engine and are thus safe to call from
synchronous finalizers. Passing a parameter of type napi_env to these APIs is
allowed, however, passing a parameter of type node_api_basic_env to APIs that
access the JavaScript engine state is not allowed. Attempting to do so without
a cast will produce a compiler warning or an error when add-ons are compiled
with flags which cause them to emit warnings and/or errors when incorrect
pointer types are passed into a function. Calling such APIs from a synchronous
finalizer will ultimately result in the termination of the application.