deno_std
deno_std copied to clipboard
feat(cli/unstable): add generic for `promptSelect()` and `promptMultipleSelect()`
This PR adds generic for
promptSelect()promptMultipleSelect()
If we pass a read-only array, then the output value is already known.
const result = promptSelect('Select browser:', ["safari", "chrome", "firefox"])
result // 'safari' | 'chrome' | 'firefox' | null
const result2 = promptMultipleSelect('Select browser:', ["safari", "chrome", "firefox"])
result2 // ('safari' | 'chrome' | 'firefox')[] | null
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.63%. Comparing base (
b2b2d57) to head (5683fc7). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6713 +/- ##
==========================================
- Coverage 94.70% 94.63% -0.07%
==========================================
Files 569 575 +6
Lines 46832 47013 +181
Branches 6588 6604 +16
==========================================
+ Hits 44350 44491 +141
- Misses 2440 2480 +40
Partials 42 42
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Does anyone have any concern on this change?