Right now the JS_PromiseState doesn't document that it can return -1 if not passing a promise in input.
Not a huge deal but would help us generate a better enum with bindgen in Rust, right now bindgen gives us a c_uint (unsigned int) because no state documented is less than 0.
Suggestion:
typedef enum JSPromiseStateEnum {
JS_PROMISE_NO_PROMISE = -1,
JS_PROMISE_PENDING = 0,
JS_PROMISE_FULFILLED,
JS_PROMISE_REJECTED,
} JSPromiseStateEnum;