Skip to main content

Home > @rushstack/terminal > ITerminalChunk

ITerminalChunk interface

Represents a chunk of output that will ultimately be written to a TerminalWritable.


export interface ITerminalChunk 


Today ITerminalChunk represents the stdout and stderr text streams. In the future, we plan to expand it to include other console UI elements such as instructions for displaying an interactive progress bar. We may also add other metadata, for example tracking whether the text string is known to contain color codes or not.

The ITerminalChunk object should be considered to be immutable once it is created. For example, SplitterTransform may pass the same chunk to multiple destinations.


kindTerminalChunkKindIndicates the kind of information stored in this chunk.
textstringThe next chunk of text from the stderr or stdout stream.