Package: @effect/platform
Module: Terminal
A Terminal represents a command-line interface which can read input from a
user and display messages to a user.
Signature
export interface Terminal {
/**
* The number of columns available on the platform's terminal interface.
*/
readonly columns: Effect<number>
/**
* The number of rows available on the platform's terminal interface.
*/
readonly rows: Effect<number>
/**
* Determines if the current terminal interface is interactive.
*/
readonly isTTY: Effect<boolean>
/**
* Reads input events from the default standard input.
*/
readonly readInput: Effect<ReadonlyMailbox<UserInput>, never, Scope.Scope>
/**
* Reads a single line from the default standard input.
*/
readonly readLine: Effect<string, QuitException>
/**
* Displays text to the the default standard output.
*/
readonly display: (text: string) => Effect<void, PlatformError>
}
Since v1.0.0