(self: Instruction)
| 265 | // ============================================================================= |
| 266 | |
| 267 | const getChoicesInternal = (self: Instruction): Option.Option<string> => { |
| 268 | switch (self._tag) { |
| 269 | case "Bool": { |
| 270 | return Option.some("true | false") |
| 271 | } |
| 272 | case "Choice": { |
| 273 | const choices = pipe( |
| 274 | Arr.map(self.alternatives, ([choice]) => choice), |
| 275 | Arr.join(" | ") |
| 276 | ) |
| 277 | return Option.some(choices) |
| 278 | } |
| 279 | case "DateTime": { |
| 280 | return Option.some("date") |
| 281 | } |
| 282 | case "Float": |
| 283 | case "Integer": |
| 284 | case "Path": |
| 285 | case "Redacted": |
| 286 | case "Secret": |
| 287 | case "Text": { |
| 288 | return Option.none() |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | const getHelpInternal = (self: Instruction): Span.Span => { |
| 294 | switch (self._tag) { |
no test coverage detected