summaryrefslogtreecommitdiff
path: root/ext/url/lib.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2022-03-16 20:25:44 -0400
committerGitHub <noreply@github.com>2022-03-17 01:25:44 +0100
commitf7ab41583e2bb4425ce7ac89b123089d0f07836a (patch)
tree1a4bbe2052499f36a202270e950dae067343b3fc /ext/url/lib.rs
parent418c1eb4b3d65a9573030a074170a344723608de (diff)
fix: cargo publish fails without absolute paths (#13993)
This reverts commit 4e3ed37037a2aa1edeac260dc3463a81d9cf9b88. Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'ext/url/lib.rs')
-rw-r--r--ext/url/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/url/lib.rs b/ext/url/lib.rs
index 0fa389fb0..46e363bc3 100644
--- a/ext/url/lib.rs
+++ b/ext/url/lib.rs
@@ -14,6 +14,7 @@ use deno_core::url::Url;
use deno_core::Extension;
use deno_core::ZeroCopyBuf;
use std::panic::catch_unwind;
+use std::path::PathBuf;
use crate::urlpattern::op_urlpattern_parse;
use crate::urlpattern::op_urlpattern_process_match_input;
@@ -186,3 +187,7 @@ pub fn op_url_stringify_search_params(
.finish();
Ok(search)
}
+
+pub fn get_declaration() -> PathBuf {
+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("lib.deno_url.d.ts")
+}