RoadmapShopEvents
Skip to main content

Home > @rushstack/terminal > StdioWritable

StdioWritable class

A TerminalWritable subclass that writes its output directly to the process stdout and stderr streams.

Signature:

export declare class StdioWritable extends TerminalWritable 

Extends: TerminalWritable

Remarks

This is the standard output target for a process. You normally do not need to construct this class; the StdioWritable.instance singleton can be used instead.

Constructors

ConstructorModifiersDescription
(constructor)(options)

Constructs a new instance of the TerminalWritable class

(Inherited from TerminalWritable)

Properties

PropertyModifiersTypeDescription
instancestaticStdioWritable
isOpenreadonlyboolean

This property is initially true when the object is constructed, and becomes false when close() is called.

(Inherited from TerminalWritable)

preventAutoclosereadonlyboolean(Inherited from TerminalWritable)

Methods

MethodModifiersDescription
close()

Calling this method flushes any remaining outputs and permanently transitions the TerminalWritable to a "closed" state, where no further chunks can be written.

(Inherited from TerminalWritable)

onClose()protected

Subclasses can override this empty method to perform additional operations such as closing a file handle.

(Inherited from TerminalWritable)

onWriteChunk(chunk)protected
writeChunk(chunk)

Upstream objects call this method to provide inputs to this object.

(Inherited from TerminalWritable)