pub unsafe extern "C" fn napi_reject_deferred(
env: napi_env,
deferred: napi_deferred,
rejection: napi_value,
) -> napi_statusAvailable on crate feature
napi only.Expand description
Rejects a promise by way of the deferred object associated.
§Arguments
-
env- Current running virtual machine context. -
deferred- The deferred object which is utilized to reject the promise. -
rejection- The rejection value used to reject the promise.
§Returns
- Returns the function execution status.
[
napi_ok] If the function executed successfully.
[napi_invalid_arg] If env, deferred or rejection is nullptr.
[napi_pending_exception] If an ArkTS exception existed when the function was called.
Available since API-level: 10