diff options
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r-- | cli/js/lib.deno.ns.d.ts | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts index b22d89ebe..f94d28407 100644 --- a/cli/js/lib.deno.ns.d.ts +++ b/cli/js/lib.deno.ns.d.ts @@ -30,16 +30,6 @@ declare namespace Deno { export function runTests(opts?: RunTestsOptions): Promise<void>; - /** Check if running in terminal. - * - * console.log(Deno.isTTY().stdout); - */ - export function isTTY(): { - stdin: boolean; - stdout: boolean; - stderr: boolean; - }; - /** Get the loadavg. Requires the `--allow-env` flag. * * console.log(Deno.loadavg()); @@ -492,6 +482,7 @@ declare namespace Deno { seekSync(offset: number, whence: SeekMode): void; close(): void; } + /** An instance of `File` for stdin. */ export const stdin: File; /** An instance of `File` for stdout. */ @@ -555,6 +546,20 @@ declare namespace Deno { /** Read-write. Behaves like `x` and allows to read from file. */ | "x+"; + // @url js/tty.d.ts + + /** UNSTABLE: newly added API + * + * Check if a given resource is TTY + */ + export function isatty(rid: number): boolean; + + /** UNSTABLE: newly added API + * + * Set TTY to be under raw mode or not. + */ + export function setRaw(rid: number, mode: boolean): void; + // @url js/buffer.d.ts /** A Buffer is a variable-sized buffer of bytes with read() and write() |