mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 15:14:33 +00:00
refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
This commit is contained in:
parent
104aebdfb5
commit
6c4da0e429
31 changed files with 177 additions and 373 deletions
|
@ -1,18 +1,18 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
((window) => {
|
||||
const { sendSync } = window.__bootstrap.dispatchJson;
|
||||
const core = window.Deno.core;
|
||||
|
||||
function consoleSize(rid) {
|
||||
return sendSync("op_console_size", { rid });
|
||||
return core.jsonOpSync("op_console_size", { rid });
|
||||
}
|
||||
|
||||
function isatty(rid) {
|
||||
return sendSync("op_isatty", { rid });
|
||||
return core.jsonOpSync("op_isatty", { rid });
|
||||
}
|
||||
|
||||
function setRaw(rid, mode) {
|
||||
sendSync("op_set_raw", { rid, mode });
|
||||
core.jsonOpSync("op_set_raw", { rid, mode });
|
||||
}
|
||||
|
||||
window.__bootstrap.tty = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue