summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.unstable.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/lib.deno.unstable.d.ts')
-rw-r--r--cli/js/lib.deno.unstable.d.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/js/lib.deno.unstable.d.ts b/cli/js/lib.deno.unstable.d.ts
index f237cd4be..a6547ebca 100644
--- a/cli/js/lib.deno.unstable.d.ts
+++ b/cli/js/lib.deno.unstable.d.ts
@@ -43,6 +43,21 @@ declare namespace Deno {
* Requires `allow-read` and `allow-write` permissions. */
export function link(oldpath: string, newpath: string): Promise<void>;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Gets the size of the console as columns/rows.
+ *
+ * ```ts
+ * const { columns, rows } = await Deno.consoleSize(Deno.stdout.rid);
+ * ```
+ */
+ export function consoleSize(
+ rid: number
+ ): {
+ columns: number;
+ rows: number;
+ };
+
export type SymlinkOptions = {
type: "file" | "dir";
};