( currentIndex: number, direction: 'up' | 'down', choiceCount: number, )
| 48 | } |
| 49 | |
| 50 | export function moveInstallPromptSelection( |
| 51 | currentIndex: number, |
| 52 | direction: 'up' | 'down', |
| 53 | choiceCount: number, |
| 54 | ): number { |
| 55 | if (direction === 'up') { |
| 56 | return Math.max(0, currentIndex - 1); |
| 57 | } |
| 58 | return Math.min(choiceCount - 1, currentIndex + 1); |
| 59 | } |
| 60 | |
| 61 | function renderInstallPrompt( |
| 62 | options: InstallPromptOptions, |
no outgoing calls
no test coverage detected