(options: SelectOptions<A>)
| 1134 | * @since 4.0.0 |
| 1135 | */ |
| 1136 | export const select = <const A>(options: SelectOptions<A>): Prompt<A> => { |
| 1137 | const opts: SelectOptionsReq<A> = { |
| 1138 | maxPerPage: 10, |
| 1139 | ...options |
| 1140 | } |
| 1141 | const initialIndex = getSelectInitialIndex(opts.choices) |
| 1142 | return custom(initialIndex, { |
| 1143 | render: handleSelectRender(opts), |
| 1144 | process: handleSelectProcess(opts), |
| 1145 | clear: handleSelectClear(opts) |
| 1146 | }) |
| 1147 | } |
| 1148 | |
| 1149 | /** |
| 1150 | * Creates a prompt that lets users filter select choices by typing. |
nothing calls this directly
no test coverage detected