Home > @rushstack/terminal > TerminalWritable > close

TerminalWritable.close() method

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

Signature:

/** @sealed */
close(): void;

Returns:

void

Remarks

The subclass provides its implementation via the the TerminalWritable.onClose() method, which is called by close().

If this method is called more than once, the additional calls are ignored; TerminalWritable.onClose will be called at most once.