(options: ConfirmOptionsReq)
| 1512 | }) |
| 1513 | |
| 1514 | const handleConfirmRender = (options: ConfirmOptionsReq) => { |
| 1515 | return (_: ConfirmState, action: Action<ConfirmState, boolean>) => { |
| 1516 | return Action.$match(action, { |
| 1517 | Beep: () => Effect.succeed(renderBeep), |
| 1518 | NextFrame: ({ state }) => renderConfirmNextFrame(state, options), |
| 1519 | Submit: ({ value }) => renderConfirmSubmission(value, options) |
| 1520 | }) |
| 1521 | } |
| 1522 | } |
| 1523 | |
| 1524 | const TRUE_VALUE_REGEXP = /^y|t$/ |
| 1525 | const FALSE_VALUE_REGEXP = /^n|f$/ |