diff options
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/mod.rs | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/cli/tsc/mod.rs b/cli/tsc/mod.rs index 4c7101d5c..db5d80a1f 100644 --- a/cli/tsc/mod.rs +++ b/cli/tsc/mod.rs @@ -115,7 +115,17 @@ pub fn get_types_declaration_file_text() -> String { } fn get_asset_texts_from_new_runtime() -> Result<Vec<AssetText>, AnyError> { - deno_core::extension!(deno_cli_tsc, ops_fn = deno_ops); + deno_core::extension!( + deno_cli_tsc, + ops = [ + op_create_hash, + op_emit, + op_is_node_file, + op_load, + op_resolve, + op_respond, + ] + ); // the assets are stored within the typescript isolate, so take them out of there let mut runtime = JsRuntime::new(RuntimeOptions { @@ -805,7 +815,14 @@ pub fn exec(request: Request) -> Result<Response, AnyError> { .collect(); deno_core::extension!(deno_cli_tsc, - ops_fn = deno_ops, + ops = [ + op_create_hash, + op_emit, + op_is_node_file, + op_load, + op_resolve, + op_respond, + ], options = { request: Request, root_map: HashMap<String, Url>, @@ -865,18 +882,6 @@ pub fn exec(request: Request) -> Result<Response, AnyError> { } } -deno_core::ops!( - deno_ops, - [ - op_create_hash, - op_emit, - op_is_node_file, - op_load, - op_resolve, - op_respond, - ] -); - #[cfg(test)] mod tests { use super::Diagnostic; |