summaryrefslogtreecommitdiff
path: root/ext/websocket/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/websocket/lib.rs')
-rw-r--r--ext/websocket/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs
index 0b9470274..95afd79bd 100644
--- a/ext/websocket/lib.rs
+++ b/ext/websocket/lib.rs
@@ -33,6 +33,7 @@ use std::borrow::Cow;
use std::cell::RefCell;
use std::convert::TryFrom;
use std::fmt;
+use std::path::PathBuf;
use std::rc::Rc;
use std::sync::Arc;
use tokio::net::TcpStream;
@@ -505,6 +506,10 @@ pub fn init<P: WebSocketPermissions + 'static>(
.build()
}
+pub fn get_declaration() -> PathBuf {
+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_websocket.d.ts")
+}
+
#[derive(Debug)]
pub struct DomExceptionNetworkError {
pub msg: String,