From 2daab9ed87a87943e03b07ca8c6a463b76086a31 Mon Sep 17 00:00:00 2001 From: frelodev Date: Thu, 26 Sep 2024 09:58:03 +0200 Subject: [PATCH] chore(js): added glue detach fn --- src/ffi/js/workspace.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ffi/js/workspace.rs b/src/ffi/js/workspace.rs index bf7dd2a..1dd43d5 100644 --- a/src/ffi/js/workspace.rs +++ b/src/ffi/js/workspace.rs @@ -66,6 +66,11 @@ impl Workspace { 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")] pub async fn js_event(&self) -> napi::Result { Ok(JsEvent::from(self.event().await?))