mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
refactor(extensions): reintroduce builder (#10412)
This commit is contained in:
parent
e63c533154
commit
e89295b176
12 changed files with 141 additions and 112 deletions
|
@ -17,12 +17,12 @@ use std::panic::catch_unwind;
|
|||
use std::path::PathBuf;
|
||||
|
||||
pub fn init() -> Extension {
|
||||
Extension::with_ops(
|
||||
include_js_files!(
|
||||
Extension::builder()
|
||||
.js(include_js_files!(
|
||||
prefix "deno:op_crates/url",
|
||||
"00_url.js",
|
||||
),
|
||||
vec![
|
||||
))
|
||||
.ops(vec![
|
||||
("op_url_parse", op_sync(op_url_parse)),
|
||||
(
|
||||
"op_url_parse_search_params",
|
||||
|
@ -32,9 +32,8 @@ pub fn init() -> Extension {
|
|||
"op_url_stringify_search_params",
|
||||
op_sync(op_url_stringify_search_params),
|
||||
),
|
||||
],
|
||||
None,
|
||||
)
|
||||
])
|
||||
.build()
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue