napi_get_reference_value
NAPI_EXTERN napi_status napi_get_reference_value(napi_env env,
napi_ref ref,
napi_value* result); [in] env:调用该 API 时所处的环境。[in] ref:请求其对应值的napi_ref。[out] result:由napi_ref引用的napi_value。
如果 API 成功,则返回 napi_ok。
【Returns napi_ok if the API succeeded.】
如果仍然有效,此 API 会返回表示与 napi_ref 关联的 JavaScript 值的 napi_value。否则,结果将是 NULL。
【If still valid, this API returns the napi_value representing the
JavaScript value associated with the napi_ref. Otherwise, result
will be NULL.】