( options: Record<string, string | boolean>, names: string[], errorMessage: string )
| 410 | } |
| 411 | |
| 412 | function requireStringOption( |
| 413 | options: Record<string, string | boolean>, |
| 414 | names: string[], |
| 415 | errorMessage: string |
| 416 | ): string { |
| 417 | const value = readStringOption(options, names); |
| 418 | if (!value) { |
| 419 | throw new CommandParseError(errorMessage); |
| 420 | } |
| 421 | return value; |
| 422 | } |
| 423 | |
| 424 | function readBooleanOption(options: Record<string, string | boolean>, names: string[], fallback: boolean): boolean { |
| 425 | const value = readOptionalBooleanOption(options, names); |
no test coverage detected