pub unsafe fn new_promise(
    context: *mut JSContext
) -> Result<PromiseRef, JsError>
Expand description

create a new Promise you can use this to respond asynchronously to method calls from JavaScript by returning a Promise

Safety

When passing a context pointer please make sure the corresponding QuickJsContext is still valid