/** * MartinLoop Arcade — Space Invaders * * A terminal Space Invaders game that runs while a background task is in * flight. Resolves with the task result when the task completes and the * user exits, or immediately falls through if the terminal is not suitable. * * Zero external dependencies. Node 18+ required. * * Controls * ← → / A D move * Space / ↑ / Z fire * P pause / unpause * R restart (game over screen only) * Q quit */ export interface ArcadeOptions { /** * Short label shown in the run-complete overlay beneath the ∞ header. * E.g. "verified · 1 attempt · $0.18 spent" */ runResultLabel?: string | ((result: T) => string); } /** * Play a Space Invaders game in the terminal while `task` runs in the * background. Returns the same value `task` resolves with. * * Gracefully skips the game (returns `task` directly) when: * - stdout / stdin are not interactive TTYs * - CI environment variable is set * - Terminal is too small (< 50 cols or < 18 rows) */ export declare function playWhileWaiting(task: Promise, opts?: ArcadeOptions): Promise;