pub unsafe extern "C" fn napi_has_element(
env: napi_env,
object: napi_value,
index: u32,
result: *mut bool,
) -> napi_statusAvailable on crate feature
napi only.Expand description
Check if the given ArkTS Array has an element at the requested index.
§Arguments
-
env- Current running virtual machine context. -
object- The ArkTS Array. -
index- The name of the property to check. -
result- Whether the property exists on the Array or not.
§Returns
- Returns the function execution status.
[
napi_ok] If the function executed successfully.
[napi_invalid_arg] If the param env, object and(or) result is nullptr.
[napi_object_expected] If the param object is not an ArkTS Object.
[napi_pending_exception] If have uncaught exception, or exception occurred in execution.
Available since API-level: 10