Home > @rushstack/terminal > ITerminalChunk
ITerminalChunk interface
Represents a chunk of output that will ultimately be written to a TerminalWritable.
Signature:
export interface ITerminalChunk
Remarks
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.
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
kind | TerminalChunkKind | Indicates the kind of information stored in this chunk. | |
text | string | The next chunk of text from the stderr or stdout stream. |