diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-10-26 00:23:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 00:23:21 +0200 |
commit | ab0c33ebf83f25b526f732e3e07de5e75a6e69bb (patch) | |
tree | b4866d8dd8ae8998429e2fdc5375c0995d92be21 /cli/dts/lib.deno.ns.d.ts | |
parent | af62e0833dbb23ac0af674b57e5938be97ad57c8 (diff) |
feat: Stabilize Deno.consoleSize() API (#15933)
This commit stabilizes "Deno.consoleSize()" API.
There is one change compared to previous unstable API,
in that the API doesn't accept any arguments. Console size
is established by querying syscalls for stdio streams at fd
0, 1 and 2.
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 0ac06dc62..eea3c7947 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -1901,6 +1901,19 @@ declare namespace Deno { */ export const File: typeof FsFile; + /** Gets the size of the console as columns/rows. + * + * ```ts + * const { columns, rows } = Deno.consoleSize(); + * ``` + * + * @category I/O + */ + export function consoleSize(): { + columns: number; + rows: number; + }; + /** @category I/O */ export interface SetRawOptions { /** |