79364466

Date: 2025-01-17 10:40:34
Score: 1
Natty:
Report link

The OpState in async is in Rc<RefCell<OpState>>

With latest deno_core version 0.331.0:

#[op2(async)]
pub async fn op_return_value(
    state: Rc<RefCell<OpState>>,
    #[string] value: String,
) -> Result<(), deno_error::JsErrorBox> {
    let state = state.borrow();
    // Use the state
    Ok(())
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: tpisto