( state: SelectState, options: SelectOptionsReq<A>, figures: Effect.Success<typeof platformFigures>, renderOptions?: RenderOptions | undefined )
| 3203 | } |
| 3204 | |
| 3205 | const renderSelectChoices = <A>( |
| 3206 | state: SelectState, |
| 3207 | options: SelectOptionsReq<A>, |
| 3208 | figures: Effect.Success<typeof platformFigures>, |
| 3209 | renderOptions?: RenderOptions | undefined |
| 3210 | ) => { |
| 3211 | const choices = options.choices |
| 3212 | const toDisplay = entriesToDisplay(state, choices.length, options.maxPerPage) |
| 3213 | const documents: Array<string> = [] |
| 3214 | for (let index = toDisplay.startIndex; index < toDisplay.endIndex; index++) { |
| 3215 | const choice = choices[index] |
| 3216 | const isSelected = state === index |
| 3217 | const prefix = renderChoicePrefix(state, choices, toDisplay, index, figures, renderOptions) |
| 3218 | const title = renderChoiceTitle(choice, isSelected, renderOptions) |
| 3219 | const description = renderChoiceDescription(choice, isSelected, renderOptions) |
| 3220 | documents.push(prefix + title + " " + description) |
| 3221 | } |
| 3222 | return documents.join("\n") |
| 3223 | } |
| 3224 | |
| 3225 | const renderAutoCompleteChoices = <A>( |
| 3226 | state: AutoCompleteState, |
no test coverage detected