export type TerminalOwnerState = "idle" | "readline" | "child" | "raw-selector";
export interface TerminalInputOwnerLike {
    pause(): unknown;
    resume(): unknown;
}
export interface ReadlineOwnerLike {
    pause(): unknown;
    resume(): unknown;
    prompt?(preserveCursor?: boolean): unknown;
}
export declare class TerminalOwner {
    private readonly input;
    private active;
    constructor(input?: TerminalInputOwnerLike);
    get state(): TerminalOwnerState;
    claimReadline(): () => void;
    withChildProcess<T>(readline: ReadlineOwnerLike | undefined, fn: () => Promise<T>): Promise<T>;
    private assertCanOwn;
}
