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

@ -36,3 +36,8 @@ pub mod worker;
mod worker_bootstrap;
pub use worker_bootstrap::BootstrapOptions;
pub struct RuntimeNodeEnv;
impl deno_node::NodeEnv for RuntimeNodeEnv {
type P = permissions::PermissionsContainer;
}