API reference
flagstaff/log-tail
Every export of flagstaff/log-tail, with its signature and doc comment: logTail, plus 3 types.
import { logTail } from 'flagstaff/log-tail';Functions
logTail
A log tail: the whole stream, appended, off a terminal; its last height rows on one.
function logTail({ height }?: LogTailOptions): Component<LogTailState>;| Parameter | Type |
|---|---|
{ height } (optional) | LogTailOptions |
Returns Component<LogTailState>
Interfaces
LogTailOptions
interface LogTailOptions {
/** Rows the tail shows on a terminal. Default 5; anything below 1 is 1. */
height?: number;
}LogTailState
interface LogTailState {
/** Every entry the stream has produced so far, oldest first. */
lines: readonly LogLine[];
}Types
LogLine
One entry of the stream: a line of output, or the start of a step.
type LogLine = string | {
step: string;
};