(options: Prompt.Prompt.ToggleOptions)
| 151 | |
| 152 | /** @internal */ |
| 153 | export const toggle = (options: Prompt.Prompt.ToggleOptions): Prompt.Prompt<boolean> => { |
| 154 | const opts: ToggleOptions = { |
| 155 | initial: false, |
| 156 | active: "on", |
| 157 | inactive: "off", |
| 158 | ...options |
| 159 | } |
| 160 | return InternalPrompt.custom(opts.initial, { |
| 161 | render: handleRender(opts), |
| 162 | process: handleProcess, |
| 163 | clear: () => handleClear(opts) |
| 164 | }) |
| 165 | } |
nothing calls this directly
no test coverage detected