summaryrefslogtreecommitdiff
path: root/runtime/js/40_tty.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-01-11 07:37:25 +0900
committerGitHub <noreply@github.com>2024-01-10 15:37:25 -0700
commit515a34b4de222e35c7ade1b92614d746e73d4c2e (patch)
tree8284201fc826a33f12597959a8a8be14e0f524bd /runtime/js/40_tty.js
parentd4893eb51a01c5a692d8ca74a3b8ff95c5fd1d9f (diff)
refactor: use `core.ensureFastOps()` (#21888)
Diffstat (limited to 'runtime/js/40_tty.js')
-rw-r--r--runtime/js/40_tty.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/js/40_tty.js b/runtime/js/40_tty.js
index 3e6cc29a5..e94fc0374 100644
--- a/runtime/js/40_tty.js
+++ b/runtime/js/40_tty.js
@@ -1,6 +1,9 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { core, primordials } from "ext:core/mod.js";
-const ops = core.ops;
+const {
+ op_console_size,
+ op_isatty,
+} = core.ensureFastOps();
const {
Uint32Array,
} = primordials;
@@ -8,12 +11,12 @@ const {
const size = new Uint32Array(2);
function consoleSize() {
- ops.op_console_size(size);
+ op_console_size(size);
return { columns: size[0], rows: size[1] };
}
function isatty(rid) {
- return ops.op_isatty(rid);
+ return op_isatty(rid);
}
export { consoleSize, isatty };