summaryrefslogtreecommitdiff
path: root/ext/net/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net/lib.rs')
-rw-r--r--ext/net/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/net/lib.rs b/ext/net/lib.rs
index 84358210e..c95348020 100644
--- a/ext/net/lib.rs
+++ b/ext/net/lib.rs
@@ -14,6 +14,7 @@ use deno_core::OpState;
use deno_tls::rustls::RootCertStore;
use std::cell::RefCell;
use std::path::Path;
+use std::path::PathBuf;
use std::rc::Rc;
pub trait NetPermissions {
@@ -60,6 +61,10 @@ pub fn check_unstable2(state: &Rc<RefCell<OpState>>, api_name: &str) {
state.borrow::<UnstableChecker>().check_unstable(api_name)
}
+pub fn get_declaration() -> PathBuf {
+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_net.d.ts")
+}
+
#[derive(Clone)]
pub struct DefaultTlsOptions {
pub root_cert_store: Option<RootCertStore>,