refactor(ext/node): change extension type parameter (#18483)

This commit changes the type parameter for "deno_node" extension, from
`P: NodePermission` to `Env: NodeEnv`.

`NodeEnv` is a new trait that has associated type `P: NodePermission`.

This is a stepping stone to support swappable file system for the
extension, that will be added as a second associated type to the 
`NodeEnv` trait.
This commit is contained in:
Bartek Iwańczuk 2023-03-28 23:52:08 +02:00 committed by GitHub
parent 6fb6b0c1f3
commit c5302a0587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 71 additions and 47 deletions

View file

@ -265,7 +265,7 @@ impl MainWorker {
deno_io::deno_io::init_ops(Some(options.stdio)),
deno_fs::deno_fs::init_ops::<PermissionsContainer>(unstable),
deno_flash::deno_flash::init_ops::<PermissionsContainer>(unstable),
deno_node::deno_node::init_ops::<PermissionsContainer>(
deno_node::deno_node::init_ops::<crate::RuntimeNodeEnv>(
options.npm_resolver,
),
// Ops from this crate