(opts: { options: SelectOption<T>[]; initialIndex?: number })
| 30 | function createNonInteractivePrompter(): Prompter { |
| 31 | return { |
| 32 | async selectOne<T>(opts: { options: SelectOption<T>[]; initialIndex?: number }): Promise<T> { |
| 33 | if (opts.options.length === 0) { |
| 34 | throw new Error('No options available for selection.'); |
| 35 | } |
| 36 | const index = clampIndex(opts.initialIndex ?? 0, opts.options.length); |
| 37 | return opts.options[index].value; |
| 38 | }, |
| 39 | async selectMany<T>(opts: { |
| 40 | options: SelectOption<T>[]; |
| 41 | initialSelectedKeys?: ReadonlySet<string>; |
nothing calls this directly
no test coverage detected