tinky / RenderOptions
Options for the render function.
optionaldebug?:boolean
If true, each update will be rendered as separate output, without replacing.
false;
optionalenv?:Record<string,string|undefined>
Environment variables.
process.env;
optionalexitOnCtrlC?:boolean
Configure whether Tinky should listen for Ctrl+C keyboard input and exit. This is needed in raw mode, where Ctrl+C is ignored by default.
true;
optionalincrementalRendering?:IncrementalRenderingOption
Configure incremental rendering mode.
true: Enables run-diff incremental rendering.falseor omitted: Disables incremental rendering.- Object mode:
{ enabled: false }disables incremental rendering.{ strategy: "line" }enables line-diff incremental rendering.{ strategy: "run" }(or omitted strategy) enables run-diff rendering.
Runtime notes:
- In
runstrategy, terminal writes are skipped entirely when frames are unchanged. - In
debugmode, Tinky always writes full frames. - In screen-reader mode, Tinky uses the screen-reader output path.
- In CI mode, Tinky avoids cursor-diff updates.
false;
optionalisScreenReaderEnabled?:boolean
Enable screen reader support.
process.env["TINKY_SCREEN_READER"] === "true";
optionalmaxFps?:number
Maximum frames per second for render updates. Controls how frequently UI can update to prevent excessive re-rendering. Higher values allow more frequent updates but may impact performance.
30;
optionalonRender?: (metrics) =>void
runs the given callback after each render and re-render.
Performance metrics of the render.
void
optionalpatchConsole?:boolean
Patch console methods to ensure console output doesn't mix with Tinky's.
true;
optionalstderr?:WriteStream
Error stream.
process.stderr;
optionalstdin?:ReadStream
Input stream where the app will listen for input.
process.stdin;
optionalstdout?:WriteStream
Output stream where the app will be rendered.
process.stdout;