MCPcopy Create free account
hub / github.com/Effect-TS/effect / handleConfirmRender

Function handleConfirmRender

packages/effect/src/unstable/cli/Prompt.ts:1514–1522  ·  view source on GitHub ↗
(options: ConfirmOptionsReq)

Source from the content-addressed store, hash-verified

1512})
1513
1514const 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
1524const TRUE_VALUE_REGEXP = /^y|t$/
1525const FALSE_VALUE_REGEXP = /^n|f$/

Callers 1

confirmFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected