chore(js): added glue detach fn

This commit is contained in:
frelodev 2024-09-26 09:58:03 +02:00
parent a89b8a454c
commit 2daab9ed87

View file

@ -66,6 +66,11 @@ impl Workspace {
Ok(self.delete(&path).await?) Ok(self.delete(&path).await?)
} }
#[napi(js_name = "detach")]
pub async fn js_detach(&self, path: String) -> bool {
self.detach(&path)
}
#[napi(js_name = "event")] #[napi(js_name = "event")]
pub async fn js_event(&self) -> napi::Result<JsEvent> { pub async fn js_event(&self) -> napi::Result<JsEvent> {
Ok(JsEvent::from(self.event().await?)) Ok(JsEvent::from(self.event().await?))