RoadmapShopEvents
Skip to main content

Home > @rushstack/stream-collator > CollatedWriter

CollatedWriter class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

An writable interface for managing output of simultaneous processes.

Signature:

export declare class CollatedWriter extends TerminalWritable 

Extends: TerminalWritable

Constructors

ConstructorModifiersDescription
(constructor)(taskName, collator)(BETA) Constructs a new instance of the CollatedWriter class

Properties

PropertyModifiersTypeDescription
bufferedChunksreadonlyReadonlyArray<ITerminalChunk>(BETA) For diagnostic purposes, if the writer is buffering chunks because it has not become active yet, they can be inspected via this property.
isActivereadonlyboolean(BETA) Returns true if this is the active writer for its associated StreamCollator.
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)
taskNamereadonlystring(BETA)
terminalreadonlyCollatedTerminal(BETA)

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()(BETA) Subclasses can override this empty method to perform additional operations such as closing a file handle.
onWriteChunk(chunk)(BETA) Subclasses should implement this abstract method to process the chunk.
writeChunk(chunk)

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

(Inherited from TerminalWritable)