/** * Gate — lets an async flow wait for an answer from the keyboard. * * Linear wizards (choose → resolve → confirm → install) read far better written * as one async function than as a state machine inside `onKey`. The gate is the * missing piece: the flow awaits `wait()`, and the key handler calls `settle()` * when the user decides. */ export interface Gate { wait(): Promise; /** Delivers the answer. Later calls are ignored. */ settle(value: T): void; /** Interrompe quem espera, propagando o erro. */ fail(error: unknown): void; /** True while somebody is waiting for an answer. */ readonly pending: boolean; } export declare function createGate(): Gate; //# sourceMappingURL=gate.d.ts.map