Class: LineBuffer

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new LineBuffer(options?: Partial‹LineBufferOptions›): LineBuffer

Parameters:

Name Type
options? Partial‹LineBufferOptions

Returns: LineBuffer

Properties

Readonly isDisabled

isDisabled: boolean

Implementation of TwistersBuffer.isDisabled


lineCount

lineCount: number

Buffered line count.


options

options: LineBufferOptions

Configuration options.

Methods

cleanup

cleanup(): void

Implementation of TwistersBuffer

  1. Restore terminal cursor visibility and position.
  2. Unmute stdin (if it was previously muted).

remarks If the handleSigint option is false, this method should be called from any custom sigint handler.

Returns: void


init

init(): void

Implementation of TwistersBuffer

  1. Hide the terminal cursor.
  2. Mute stdin (if discardStdin option is true).

Returns: void


teardown

teardown(): void

Implementation of TwistersBuffer

Clear from the cursor to the end of the screen.

Returns: void


updateBegin

updateBegin(): void

Implementation of TwistersBuffer

Reset the line counter.

Returns: void


updateEnd

updateEnd(): void

Implementation of TwistersBuffer

  1. Clear from the cursor to the end of the screen.
  2. Move the cursor to top of buffered content.

Returns: void


write

write(text: string | null, isBuffered: boolean): void

Implementation of TwistersBuffer

Write text to the stream.

Usage Notes:

Parameters:

Name Type Default
text string | null -
isBuffered boolean true

Returns: void