napi_get_value_bool

Function napi_get_value_bool 

Source
pub unsafe extern "C" fn napi_get_value_bool(
    env: napi_env,
    value: napi_value,
    result: *mut bool,
) -> napi_status
Available on crate feature napi only.
Expand description

Obtains the C Boolean equivalent of an ArkTS Boolean value.

§Arguments

  • env - Current running virtual machine context.

  • value - A napi_value representing ArkTS Boolean.

  • result - The C boolean equivalent of the ArkTS Boolean.

§Returns

  • Returns the function execution status. [napi_ok] If the function executed successfully.

[napi_invalid_arg] If the param env, value and(or) result is nullptr.

[napi_boolean_expected] If a non-boolean ArkTS value passed in it.

Available since API-level: 10