mirror of
https://github.com/denoland/deno.git
synced 2025-09-22 10:22:34 +00:00
feat(unstable): Deno.setRaw -> Deno.stdin.setRaw (#15797)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
fa9e7aab6d
commit
70bc0eb72b
12 changed files with 43 additions and 50 deletions
|
@ -181,6 +181,11 @@
|
|||
}
|
||||
return this.#readable;
|
||||
}
|
||||
|
||||
setRaw(mode, options = {}) {
|
||||
const cbreak = !!(options.cbreak ?? false);
|
||||
ops.op_stdin_set_raw(mode, cbreak);
|
||||
}
|
||||
}
|
||||
|
||||
class Stdout {
|
||||
|
|
|
@ -21,14 +21,8 @@
|
|||
return !!isattyBuffer[0];
|
||||
}
|
||||
|
||||
const DEFAULT_CBREAK = false;
|
||||
function setRaw(rid, mode, options = {}) {
|
||||
ops.op_set_raw(rid, mode, options.cbreak || DEFAULT_CBREAK);
|
||||
}
|
||||
|
||||
window.__bootstrap.tty = {
|
||||
consoleSize,
|
||||
isatty,
|
||||
setRaw,
|
||||
};
|
||||
})(this);
|
||||
|
|
|
@ -117,7 +117,6 @@
|
|||
};
|
||||
|
||||
__bootstrap.denoNsUnstable = {
|
||||
setRaw: __bootstrap.tty.setRaw,
|
||||
consoleSize: __bootstrap.tty.consoleSize,
|
||||
DiagnosticCategory: __bootstrap.diagnostics.DiagnosticCategory,
|
||||
loadavg: __bootstrap.os.loadavg,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue