From cc5462e5a934affd232381fc84d6b174d29b8d6e Mon Sep 17 00:00:00 2001 From: Yuki Kishimoto Date: Sat, 20 Jan 2024 15:56:10 +0100 Subject: [PATCH] js: impl Deref for JsWebLN --- webln-js/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webln-js/src/lib.rs b/webln-js/src/lib.rs index aefe104..8041464 100644 --- a/webln-js/src/lib.rs +++ b/webln-js/src/lib.rs @@ -41,6 +41,14 @@ pub struct JsWebLN { inner: WebLN, } +impl Deref for JsWebLN { + type Target = WebLN; + + fn deref(&self) -> &Self::Target { + &self.inner + } +} + #[wasm_bindgen(js_class = WebLN)] impl JsWebLN { /// Compose new WebLN instance