Function create_promise

Source
pub fn create_promise<Res>(
    env: &Env,
    executor: Box<dyn FnOnce(Env, Box<dyn Fn(Res)>, Box<dyn Fn(Error)>) -> Result<()>>,
) -> Result<JsObject>
where Res: NapiValue + 'static,