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

also return value for $.select #292

Open
scarf005 opened this issue Nov 21, 2024 · 0 comments
Open

also return value for $.select #292

scarf005 opened this issue Nov 21, 2024 · 0 comments

Comments

@scarf005
Copy link
Contributor

it feels more natural to return value for selection:

const selectedBranch: string = await $.select({
    message: "Select a branch:",
    options: branches,
})

or we could return an option:

> await $.select({
...     message: "Select a branch:",
...     options: branches,
... })
{ index: 10, value: "main" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant