diff options
author | Marcus Hultman <marcus.hultman1@gmail.com> | 2020-11-30 10:08:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 11:08:03 -0500 |
commit | c7276e15e54b43aa6649ca149d92811059c6415f (patch) | |
tree | b8566602042d225282f146ca1559ebab754b2907 /cli/dts/lib.deno.unstable.d.ts | |
parent | 7a4d0fc22b08f71f17d6efbdd89a28fc8fcb452f (diff) |
feat(unstable): add cbreak option to setRaw (#8383)
Diffstat (limited to 'cli/dts/lib.deno.unstable.d.ts')
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 667b1fbba..d8e226699 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -815,6 +815,10 @@ declare namespace Deno { windowChange: () => SignalStream; }; + export type SetRawOptions = { + cbreak: boolean; + }; + /** **UNSTABLE**: new API, yet to be vetted * * Set TTY to be under raw mode or not. In raw mode, characters are read and @@ -823,11 +827,19 @@ declare namespace Deno { * Reading from a TTY device in raw mode is faster than reading from a TTY * device in canonical mode. * + * The `cbreak` option can be used to indicate that characters that correspond + * to a signal should still be generated. When disabling raw mode, this option + * is ignored. This functionality currently only works on Linux and Mac OS. + * * ```ts - * Deno.setRaw(myTTY.rid, true); + * Deno.setRaw(myTTY.rid, true, { cbreak: true }); * ``` */ - export function setRaw(rid: number, mode: boolean): void; + export function setRaw( + rid: number, + mode: boolean, + options?: SetRawOptions, + ): void; /** **UNSTABLE**: needs investigation into high precision time. * |