Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AbortSignal to @inquirer/core. #1521

Closed
mshima opened this issue Aug 26, 2024 · 1 comment · Fixed by #1524
Closed

Add AbortSignal to @inquirer/core. #1521

mshima opened this issue Aug 26, 2024 · 1 comment · Fixed by #1524

Comments

@mshima
Copy link
Contributor

mshima commented Aug 26, 2024

Allow to programmatically cancel the prompt.

Timeout example.

await input(
  { message: 'Enter your name' },
  { signal: AbortSignal.timeout(5000) },
});

In yeoman-environment conflicter, conflict check and commit is done in background while the conflict resolution question is prompted. AbortSignal support will make easy to cancel the prompt.

@SBoudrias
Copy link
Owner

Ah, I think that's a great idea.

I'm happy to review a PR, or I'll get to it in a few weeks.

SBoudrias added a commit that referenced this issue Sep 2, 2024
…ly cancel a prompt (#1534)

Co-authored-by: Marcelo Shima <marceloshima@gmail.com>

Ref #1521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants