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

Function processSelectCursorUp

packages/effect/src/cli/Prompt.ts:3531–3536  ·  view source on GitHub ↗
(state: SelectState, choices: SelectOptionsReq<A>["choices"])

Source from the content-addressed store, hash-verified

3529})
3530
3531const processSelectCursorUp = <A>(state: SelectState, choices: SelectOptionsReq<A>["choices"]) => {
3532 if (state === 0) {
3533 return Effect.succeed(Action.NextFrame({ state: choices.length - 1 }))
3534 }
3535 return Effect.succeed(Action.NextFrame({ state: state - 1 }))
3536}
3537
3538const processSelectCursorDown = <A>(state: SelectState, choices: SelectOptionsReq<A>["choices"]) => {
3539 if (state === choices.length - 1) {

Callers 1

handleSelectProcessFunction · 0.85

Calls 1

succeedMethod · 0.45

Tested by

no test coverage detected