/**
 * @license
 * Copyright 2022-2026 Greg Lauckhart <greg@lauckhart.com>
 * SPDX-License-Identifier: Apache-2.0
 */
import { Consumer } from "./consumer.js";
import { Producer } from "./producer.js";
import { Wrapper } from "./wrapper.js";
/**
 * Text output with high-level formatting functionality.
 */
export interface Printer extends Consumer {
    (...text: Printer.Sequence): void;
    target: Consumer;
    write(...text: Printer.Sequence): void;
    writeTruncated(...text: Producer.Sequence): void;
    writeTruncatedLine(...text: Producer.Sequence): void;
}
export declare function Printer(out: Printer.Output, options?: Printer.Options): Printer;
export declare function Printer(target: Consumer, options?: Printer.Options): Printer;
export declare namespace Printer {
    /**
     * A simple text output function.
     */
    type Output = (text: string) => void;
    interface Options extends Omit<Consumer.Options, "wrap"> {
        wrap?: boolean | Wrapper.Options;
    }
    /**
     * An object that can render itself to a {@link Printer}.
     */
    interface Renderable {
        renderTo(printer: Printer): void;
    }
    /**
     * Extended sequence type that accepts {@link Renderable} in addition to standard {@link Producer.Sequence} items.
     */
    type Sequence = Array<string | import("./token.js").Token | Producer | Renderable>;
    function isRenderable(item: Sequence[number]): item is Renderable;
}
//# sourceMappingURL=printer.d.ts.map