fn js_error_to_op_error(error: ErrBox) -> OpError {
  match error.downcast::<JSError>() {
    Ok(js_error) => {
      let msg = format!("Error in TS compiler:\n{}", js_error);
      OpError::other(msg)
    }
    Err(error) => error.into(),
  }
}
/// Because TS compiler can raise runtime error, we need to
/// manually convert formatted JSError into and OpError.
Because TS compiler can raise runtime error, we need to
manually convert formatted JSError into and OpError.
Because TS compiler can raise runtime error we need to manually convert formatted JSError into and OpError .
fn js_error_to_op_error(error: ErrBox) -> OpError {
  match error.downcast::<JSError>() {
    Ok(js_error) => {
      let msg = format!("Error in TS compiler:\n{}", js_error);
      OpError::other(msg)
    }
    Err(error) => error.into(),
  }
}
fn js_error_to_op_error ( error : ErrBox ) -> OpError { match error . downcast :: < JSError > ( ) { Ok ( js_error ) => { let msg = format ! ( " \n " js_error ) ; OpError :: other ( msg ) } Err ( error ) => error . into ( ) , } }
Because TS compiler can raise runtime error, we need to
manually convert formatted JSError into and OpError.
Because TS compiler can raise runtime error we need to manually convert formatted JSError into and OpError .
error
ErrBox
error
ErrBox