import { StringBuffer } from './StringBuffer';
/**
 * Implements soft line wrapping on an appendable. To use, append characters using
 * [LineWrapper.append] or soft-wrapping spaces using [LineWrapper.wrappingSpace].
 */
export declare class LineWrapper {
    private readonly out;
    private readonly indent;
    private readonly columnLimit;
    private closed;
    /** Characters written since the last wrapping space that haven't yet been flushed.  */
    private buffer;
    /** The number of characters since the most recent newline. Includes both out and the buffer.  */
    private column;
    /** -1 if we have no buffering; otherwise the number of spaces to write after wrapping.  */
    private indentLevel;
    private nextFlush?;
    constructor(out: StringBuffer, indent: string, columnLimit: number);
    /** Emit `s`. This may be buffered to permit line wraps to be inserted.  */
    append(s: string): void;
    /** Emit either a space or a newline character.  */
    wrappingSpace(indentLevel: number): void;
    /** Emit a newline character if the line will exceed it's limit, otherwise do nothing. */
    zeroWidthSpace(indentLevel: number): void;
    /** Flush any outstanding text and forbid future writes to this line wrapper.  */
    close(): void;
    toString(): string;
    /** Write the space followed by any buffered text that follows it.  */
    private flush;
}
