mlx-bun library API
    Preparing search index...

    The terminal the loop draws on. Key input and resize notification are optional: absent when stdin is not a TTY, as with a piped run.

    interface WatchTerminal {
        keys?(onKey: (key: string) => void): () => void;
        onResize?(listener: () => void): () => void;
        size(): { columns: number; rows: number };
        write(text: string): void;
    }
    Index
    • Raw key input; returns a detach function restoring the previous mode.

      Parameters

      • onKey: (key: string) => void

      Returns () => void