summaryrefslogtreecommitdiff
path: root/ext/fetch/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r--ext/fetch/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs
index 59d5f9a6b..b744a9bbd 100644
--- a/ext/fetch/lib.rs
+++ b/ext/fetch/lib.rs
@@ -45,6 +45,7 @@ use std::borrow::Cow;
use std::cell::RefCell;
use std::convert::From;
use std::path::Path;
+use std::path::PathBuf;
use std::pin::Pin;
use std::rc::Rc;
use tokio::io::AsyncReadExt;
@@ -170,6 +171,10 @@ pub trait FetchPermissions {
fn check_read(&mut self, _p: &Path) -> Result<(), AnyError>;
}
+pub fn get_declaration() -> PathBuf {
+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_fetch.d.ts")
+}
+
#[derive(Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FetchArgs {