(state: SelectState, choices: SelectOptionsReq<A>["choices"])
| 3298 | } |
| 3299 | |
| 3300 | const processSelectCursorDown = <A>(state: SelectState, choices: SelectOptionsReq<A>["choices"]) => { |
| 3301 | if (state === choices.length - 1) { |
| 3302 | return Effect.succeed(Action.NextFrame({ state: 0 })) |
| 3303 | } |
| 3304 | return Effect.succeed(Action.NextFrame({ state: state + 1 })) |
| 3305 | } |
| 3306 | |
| 3307 | const processSelectNext = <A>(state: SelectState, choices: SelectOptionsReq<A>["choices"]) => { |
| 3308 | return Effect.succeed(Action.NextFrame({ state: (state + 1) % choices.length })) |
no test coverage detected