summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.unstable.d.ts
diff options
context:
space:
mode:
authorSebastien Filion <sebastienfilion@mac.com>2020-07-10 10:07:12 -0400
committerGitHub <noreply@github.com>2020-07-10 10:07:12 -0400
commit1bcc35b84a78fb052b8092b7ed57c2ce763f5d4b (patch)
tree913a4533901ba35bf47012009c0fa4c88b8ebe60 /cli/js/lib.deno.unstable.d.ts
parentdc6b3ef714c743358703512cd766aed4abc8bd3b (diff)
feat(unstable): add Deno.consoleSize (#6520)
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";
};