/** * Flushes any stale bytes from the OS-level stdin buffer before showing an * interactive Inquirer prompt. * * On Windows terminals backed by ConPTY (e.g. WezTerm), pressing Enter in one * @inquirer/core prompt can leave a residual byte in the OS input buffer. * @inquirer/core defers its first keypress handler by one setImmediate tick so * that stale bytes are normally discarded. However, if the byte arrives in a * later I/O poll cycle (which ConPTY can do), it reaches the new prompt after * its handler is registered and immediately submits the default answer — * making the prompt appear to require two Enter presses from the user. * * Briefly putting stdin into flowing mode allows the OS to flush buffered * bytes during the next I/O poll. Two setImmediate ticks are used so the * drain completes regardless of the current event-loop phase. */ export declare function drainStdin(): Promise;