/** * @file Node-side `Logger` class — owns per-instance state (parent, bound * stream, indent buffers, theme) and exposes the public surface as thin * delegators over sibling free-function leaves. Console construction is lazy: * the constructor stashes its args in `shared.privateConstructorArgs` and * the `node:console` instance is built on first `#getConsole()`, so the * logger can be imported during early Node.js bootstrap before stdout is * ready (avoiding `ERR_CONSOLE_WRITABLE_STREAM`). Method bodies live in the * leaves: `./console-methods`, `./semantic-methods`, `./indentation-methods`, * `./stream-methods`, `./console`, `./options`, `./symbols`, * `./symbols-builder`, `./shared`. */ import { incLogCallCountSymbol, lastWasBlankSymbol } from './symbols.js'; import type { Task } from './types.js'; /** * Enhanced console logger with indentation, colored symbols, and stream * management. */ export declare class Logger { #private; /** * Static reference to log symbols for convenience. */ static LOG_SYMBOLS: Record; /** * Creates a new Logger. With no args it uses the default `process.stdout` / * `process.stderr`; an options object customizes stream / theme. See * {@link parseLoggerOptions}. * * @param args - Optional console constructor arguments. */ constructor(...args: unknown[]); get stderr(): Logger; get stdout(): Logger; get logCallCount(): number; [incLogCallCountSymbol](): this; [lastWasBlankSymbol](value: unknown, stream?: 'stderr' | 'stdout' | undefined): this; assert(value: unknown, ...message: unknown[]): this; clearLine(): this; clearVisible(): this; count(label?: string | undefined): this; /** * Creates a task whose `run()` logs "Starting task: {name}" before running * the provided function and "Completed task: {name}" after. * * @param name - The name of the task. * * @returns A task object with a `run()` method. */ createTask(name: string): Task; dedent(spaces?: number): this; dir(obj: unknown, options?: unknown | undefined): this; dirxml(...data: unknown[]): this; done(...args: unknown[]): this; error(...args: unknown[]): this; errorNewline(): this; fail(...args: unknown[]): this; group(...label: unknown[]): this; groupCollapsed(...label: unknown[]): this; groupEnd(): this; indent(spaces?: number): this; info(...args: unknown[]): this; log(...args: unknown[]): this; logNewline(): this; progress(text: string): this; resetIndent(): this; skip(...args: unknown[]): this; step(msg: string, ...extras: unknown[]): this; substep(msg: string, ...extras: unknown[]): this; success(...args: unknown[]): this; table(tabularData: unknown, properties?: readonly string[] | undefined): this; time(label?: string | undefined): this; timeEnd(label?: string | undefined): this; timeLog(label?: string | undefined, ...data: unknown[]): this; trace(message?: unknown | undefined, ...args: unknown[]): this; warn(...args: unknown[]): this; write(text: string): this; }