Function
optionalStringArray
(argumentName: string, rawValue: string[])
Source from the content-addressed store, hash-verified
| 91 | } |
| 92 | |
| 93 | export function optionalStringArray(argumentName: string, rawValue: string[]): string[] | undefined { |
| 94 | if (rawValue.length === 0) { |
| 95 | return undefined; |
| 96 | } |
| 97 | |
| 98 | if (typeof rawValue === "string") { |
| 99 | throw new Error(`${argumentName}: invalid parameter - you provided "${rawValue}". This option expects an list in the EXACT format described in the readme`); |
| 100 | } |
| 101 | |
| 102 | return rawValue; |
| 103 | } |
Tested by
no test coverage detected