mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
feat(core) deno_core::extension! macro to simplify extension registration (#18210)
This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements: * `deno_core::ops!` registers a block of `#[op]`s, optionally with type parameters, useful for places where we share lists of ops * `deno_core::extension!` is used to register an extension, and creates two methods that can be used at runtime/snapshot generation time: `init_ops` and `init_ops_and_esm`. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
0bc6bf5d33
commit
e55b448730
53 changed files with 1690 additions and 1851 deletions
|
@ -165,7 +165,11 @@ async fn test_specifier(
|
|||
&ps,
|
||||
specifier.clone(),
|
||||
PermissionsContainer::new(permissions),
|
||||
vec![ops::testing::init(sender, fail_fast_tracker, filter)],
|
||||
vec![ops::testing::deno_test::init_ops(
|
||||
sender,
|
||||
fail_fast_tracker,
|
||||
filter,
|
||||
)],
|
||||
Stdio {
|
||||
stdin: StdioPipe::Inherit,
|
||||
stdout,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue