Homesplat-transform API Reference - v3.0.0
    Preparing search index...

    Interface TextRendererOptions

    Output streams and optional memory-usage probe for TextRenderer.

    interface TextRendererOptions {
        getPeakCpuMemory?: () => number;
        getPeakGpuMemory?: () => number;
        output?: (chunk: string) => void;
        write: (chunk: string) => void;
    }
    Index
    getPeakCpuMemory?: () => number

    Optional peak CPU-side memory probe in bytes (monotonic). Used by the [peak cpu=X] overlay gated by the renderer's mem field. In Node this is typically derived from process.resourceUsage().maxRSS (which is kernel-tracked and reflects the whole process - including ArrayBuffers - rather than just the V8 heap).

    getPeakGpuMemory?: () => number

    Optional peak GPU memory probe in bytes (monotonic, like getPeakCpuMemory). When supplied alongside getPeakCpuMemory and reporting a non-zero value, the --memory overlay gains a gpu=Y entry: [peak cpu=X gpu=Y]. Zero suppresses the entry, so runs that never touch the GPU keep the CPU-only overlay. In the CLI this is fed by the engine's VRAM counters (see node-device.ts).

    output?: (chunk: string) => void

    Receives output events, one logical unit per call, each already terminated with \n by the renderer. Hand this to the pipeable channel (typically process.stdout.write.bind(process.stdout)). Defaults to the same sink as write when omitted.

    write: (chunk: string) => void

    Receives all status chunks (scopes, bars, messages). May contain partial-line writes (e.g. progress-bar # ticks). For TTY output, hand this to a stream that flushes on partials (process.stderr.write.bind(process.stderr) in Node) so bars render in place. For non-interactive output (CI logs, file redirects), wrap in a line buffer that holds chunks until a \n arrives - the bar's incremental writes then coalesce into a single complete line per bar.