#[unsafe(no_mangle)]pub unsafe extern "C" fn JS_PromiseState(
ctx: *mut JsContext,
promise: JsValue,
) -> c_intExpand description
JS_PromiseState: JS_PROMISE_PENDING (0), FULFILLED (1) or REJECTED (2).
A non-promise answers REJECTED in the reference, which is a TypeError’s worth of
surprise but is what a caller branching on the answer expects.
§Safety
promise must be a live JSValue.