Skip to main content
Module

x/cliffy/ansi/chain.ts>Chain

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
interface Chain
import { type Chain } from "https://deno.land/x/cliffy@v1.0.0-rc.3/ansi/chain.ts";

Chainable ansi escape method declarations.

Type Parameters

TContext extends Chain<TContext>

Properties

text: (text: string) => TContext

Add text.

toArray: () => Array<string>

Ring audio bell: \u0007

cursorPosition: TContext

Get cursor position.

cursorTo: (x: number, y?: number) => TContext

Move cursor to x, y, counting from the top left corner.

cursorMove: (x: number, y: number) => TContext

Move cursor by offset.

cursorUp: TContext & ((count: number) => TContext)

Move cursor up by n lines.

cursorDown: TContext & ((count: number) => TContext)

Move cursor down by n lines.

cursorForward: TContext & ((count: number) => TContext)

Move cursor forward by n lines.

cursorBackward: TContext & ((count: number) => TContext)

Move cursor backward by n lines.

cursorNextLine: TContext & ((count: number) => TContext)

Move cursor to the beginning of the line n lines down.

cursorPrevLine: TContext & ((count: number) => TContext)

Move cursor to the beginning of the line n lines up.

cursorLeft: TContext

Move cursor to first column of current row.

cursorHide: TContext

Hide cursor.

cursorShow: TContext

Show cursor.

cursorSave: TContext

Save cursor.

cursorRestore: TContext

Restore cursor.

scrollUp: TContext & ((count: number) => TContext)

Scroll window up by n lines.

scrollDown: TContext & ((count: number) => TContext)

Scroll window down by n lines.

eraseScreen: TContext

Clear screen.

eraseUp: TContext & ((count: number) => TContext)

Clear screen up by n lines.

eraseDown: TContext & ((count: number) => TContext)

Clear screen down by n lines.

eraseLine: TContext

Clear current line.

eraseLineEnd: TContext

Clear to line end.

eraseLineStart: TContext

Clear to line start.

eraseLines: (count: number) => TContext

Clear screen and move cursor by n lines up and move cursor to first column.

clearScreen: TContext

Clear the terminal screen. (Viewport)

clearTerminal: TContext

Clear the whole terminal, including scrollback buffer. (Not just the visible part of it).

image: (buffer: string | ArrayBuffer, options?: ImageOptions) => TContext

Create image.