(request: QuestionRequest, state: QuestionBodyState)
| 94 | } |
| 95 | |
| 96 | export function questionTotal(request: QuestionRequest, state: QuestionBodyState): number { |
| 97 | const info = questionInfo(request, state) |
| 98 | if (!info) { |
| 99 | return 0 |
| 100 | } |
| 101 | |
| 102 | return info.options.length + (questionCustom(request, state) ? 1 : 0) |
| 103 | } |
| 104 | |
| 105 | export function questionAnswers(state: QuestionBodyState, count: number): string[][] { |
| 106 | return Array.from({ length: count }, (_, idx) => state.answers[idx] ?? []) |
no test coverage detected