diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-07-08 18:56:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 18:56:53 +0200 |
commit | 27e1b4cb5ac81c5ac2ca5adf78c91fdbef9409e8 (patch) | |
tree | e5dc9610d551663926eceb34a0e4a31b8624b487 /cli/lsp/tsc.rs | |
parent | 91fe137d7da3cbd1ab1c2cfd963962d964571526 (diff) |
feat(core): return v8::Value from JsRuntime::execute_script (#11129)
This commit changes return type of JsRuntime::execute_script to include
v8::Value returned from evaluation.
When embedding deno_core it is sometimes useful to be able to inspect
script evaluation value without the hoops of adding ops to store the
value on the OpState.
v8::Global<v8::Value> is used so consumers don't have to pass
scope themselves.
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r-- | cli/lsp/tsc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 130e025ae..aed1dda9d 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -2265,7 +2265,8 @@ fn start( let init_config = json!({ "debug": debug, "rootUri": root_uri }); let init_src = format!("globalThis.serverInit({});", init_config); - runtime.execute_script(&located_script_name!(), &init_src) + runtime.execute_script(&located_script_name!(), &init_src)?; + Ok(()) } #[derive(Debug, Serialize)] |