/** * @file Free-function bodies for the `Logger` methods that write to or clear a * raw stream rather than going through the indented `#apply` path * (`clearLine`, `clearVisible`, `progress`, `write`). Each takes the calling * logger plus the already-resolved `node:console` instance and whatever * stream / symbol state it needs, then updates the shared blank-line / * call-count tracking via the exported logger symbols. Pulling these out of * `./node` keeps the `Logger` class body under the file-size cap; the class * retains one-line delegators that resolve the arguments from its private * state. */ import type { ConsoleLike, LoggerTrackable } from './console-methods.js'; import type { LogSymbols } from './types.js'; /** * Clears the current terminal line on the logger's target stream (TTY and * non-TTY). Useful after `progress()`. Returns the logger for chaining. * * @param logger - The calling logger instance. * @param con - The logger's resolved console instance. * @param stream - The target stream to clear. */ export declare function clearLineMethod(logger: T, con: ConsoleLike, stream: 'stderr' | 'stdout'): T; /** * Clears the visible terminal screen. Only valid on the main (non-stream-bound) * logger. When the underlying stdout is a TTY, resets blank-line tracking and * invokes `resetCount` to zero the log-call counter. Returns the logger for * chaining. * * @param logger - The calling logger instance. * @param con - The logger's resolved console instance. * @param boundStream - The logger's bound stream, or `undefined` on the root. * @param resetCount - Callback that zeroes the logger's log-call counter. * * @throws {Error} If called on a stream-bound logger instance. */ export declare function clearVisibleMethod(logger: T, con: ConsoleLike, boundStream: 'stderr' | 'stdout' | undefined, resetCount: () => void): T; /** * Shows a progress indicator (a `∴`-prefixed status message) that can be * cleared with `clearLine()`. Always clears the current line first so repeated * `progress(...)` calls redraw cleanly. Returns the logger for chaining. * * @param logger - The calling logger instance. * @param con - The logger's resolved console instance. * @param stream - The target stream to write to. * @param symbols - The logger's resolved `LogSymbols` map. * @param text - The progress message to display. */ export declare function progressMethod(logger: T, con: ConsoleLike, stream: 'stderr' | 'stdout', symbols: LogSymbols, text: string): T; /** * Writes text directly to the original stdout stream, bypassing Console * formatting and applying no indentation. Returns the logger for chaining. * * The original stdout is resolved with a three-way fallback: the seeded * `originalStdout`, then the constructor args' `stdout`, then the Console's * internal `_stdout` slot. * * @param logger - The calling logger instance. * @param con - The logger's resolved console instance. * @param originalStdout - The stdout seeded at construction, if any. * @param ctorArgs - The logger's stored constructor args. * @param text - The text to write. */ export declare function writeMethod(logger: T, con: ConsoleLike, originalStdout: NodeJS.WritableStream | undefined, ctorArgs: unknown[], text: string): T;