/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Docker } from "./docker.js";
/**
 * A "terminal" is an API for reading and writing data to a running process.
 *
 * We support two types:
 *
 *   * {@link Terminal.Raw} emits chunks of bytes, tagged with "stderr" and "stdout" depending on source
 *   * {@link Terminal.Line} is line oriented and emits a string for each line
 */
export interface Terminal<OutputT> extends AsyncIterable<OutputT> {
    write(content: unknown): Promise<void>;
    close(): Promise<void>;
    consume(): Promise<OutputT>;
}
export declare namespace Terminal {
    interface Factory<OutputT = unknown> {
        (docker: Docker, stream: NodeJS.ReadWriteStream, exited: Promise<void>): Terminal<OutputT>;
    }
    interface Chunk extends Uint8Array {
        source?: "stdout" | "stderr";
    }
    function Raw(docker: Docker, stream: NodeJS.ReadWriteStream, exited: Promise<void>): Terminal<Chunk>;
    function Line(docker: Docker, stream: NodeJS.ReadWriteStream, exited: Promise<void>): Terminal<string>;
    function StdoutLine(docker: Docker, stream: NodeJS.ReadWriteStream, exited: Promise<void>): Terminal<string>;
}
//# sourceMappingURL=terminal.d.ts.map