napi_get_boolean
napi_status napi_get_boolean(napi_env env, bool value, napi_value* result)
-
[in] env
:调用 API 的环境。¥
[in] env
: The environment that the API is invoked under. -
[in] value
:要检索的布尔值。¥
[in] value
: The value of the boolean to retrieve. -
[out] result
:napi_value
表示要检索的 JavaScriptBoolean
单例。¥
[out] result
:napi_value
representing JavaScriptBoolean
singleton to retrieve.
如果 API 成功,则返回 napi_ok
。
¥Returns napi_ok
if the API succeeded.
此 API 用于返回用于表示给定布尔值的 JavaScript 单例对象。
¥This API is used to return the JavaScript singleton object that is used to represent the given boolean value.