diff options
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. * |